-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEditEvent.aspx
60 lines (52 loc) · 2.4 KB
/
EditEvent.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<%@ Page Title="" Language="C#" MasterPageFile="~/coord.master" AutoEventWireup="true" CodeBehind="EditEvent.aspx.cs" Inherits="CapstoneFinal.EditEvent" %>
<asp:Content ID="Content1" ContentPlaceHolderID="nestedFirst" runat="server">
<fieldset style="margin:20px; padding:20px; display:inline" >
<legend style="color:#450084; font-size:x-large;">View/Edit Event</legend>
<asp:Label ID="lbSearch" runat="server" Text="Search:"></asp:Label>
<asp:TextBox ID="tbSearch" runat="server"></asp:TextBox>
<asp:Button ID="searchB" runat="server" Text="Search" OnClick="Search_Click" />
<br />
<br />
<asp:DetailsView ID="dvStudent" Height="400px" Width="200px"
DataSourceID="srcEvents"
DataKeyNames="EventID"
AllowPaging = "true"
PageSize ="15"
AutoGenerateEditButton="true"
AutoGenerateRows="false"
PagerSettings-Mode="NumericFirstLast"
EmptyDataText="No Events Found"
runat="server">
<Fields>
<asp:BoundField DataField="EventID"
HeaderText="Event ID"
ReadOnly="true"
InsertVisible="false" />
<asp:BoundField DataField="EventTitle"
HeaderText="Event Title" />
<asp:BoundField headertext="Start Time " DataFormatString="{0:hh\:mm}"
datafield="Time" HtmlEncode="false" />
<asp:BoundField headertext="End Time " DataFormatString="{0:hh\:mm}"
datafield="End" HtmlEncode="false" />
<asp:BoundField DataField="Location"
HeaderText="Location" />
</Fields>
</asp:DetailsView>
</fieldset>
<asp:SqlDataSource
ID="srcEvents"
ConnectionString="<%$ connectionStrings:lab4 %>"
runat="server"
SelectCommand="SELECT * FROM Event"
FilterExpression="EventTitle like '%{0}%' OR Location like '%{0}%'"
UpdateCommand="UPDATE Event SET EventTitle=@EventTitle, Time=@Time, [end]=@end Location=@Location WHERE EventID=@EventID"
DeleteCommand="DELETE Event WHERE EventID=@EventID">
<FilterParameters>
<asp:ControlParameter
Name="FirstOrLastName"
ControlID="tbSearch" />
</FilterParameters>
</asp:SqlDataSource>
<br />
<br />
</asp:Content>