文件操作 - Holidays.aspx
返回文件管理
返回主菜单
删除本文件
文件: E:\HostingSpaces\kimblycr\howell.kimbly.in\wwwroot\Holidays.aspx
编辑文件内容
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Holidays.aspx.cs" Inherits="HowellWebService.Holidays" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link href="css/bootstrap.css" rel="stylesheet" /> <link href="css/StyleSheet.css" rel="stylesheet" /> <link href="css/bootstrap-responsive.css" rel="stylesheet" /> </head> <body> <form id="form1" runat="server"> <h3>Holidays</h3> <hr style="width:100%" /> <div id="infoContainer"> <div class="boxInfo" id="Home" style="padding-top: 30px;display:block"> <div class="row"> <div class="span6" style="height: 900px;padding-top: 5px;padding-left: 30px;" id="DivDashboardSpan3"> <asp:TextBox ID="txtYear" runat="server" CssClass="form-control" style="width: 30%;margin-bottom:5px" AutoPostBack="True" OnTextChanged="txtYear_TextChanged"></asp:TextBox> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1" CellPadding="4" ForeColor="#333333" GridLines="None" Width="290px"> <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> <Columns> <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" /> <asp:BoundField DataField="HYear" HeaderText="Year" SortExpression="HYear" /> <asp:BoundField DataField="HDate" HeaderText="Date" SortExpression="HDate" DataFormatString="{0:dd-MMM-yy}" /> <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" /> <asp:CommandField ShowDeleteButton="True" /> </Columns> <EditRowStyle BackColor="#999999" /> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <SortedAscendingCellStyle BackColor="#E9E7E2" /> <SortedAscendingHeaderStyle BackColor="#506C8C" /> <SortedDescendingCellStyle BackColor="#FFFDF8" /> <SortedDescendingHeaderStyle BackColor="#6F8DAE" /> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" DeleteCommand="DELETE FROM [Holidays] WHERE [ID] = @ID" InsertCommand="INSERT INTO [Holidays] ([HYear], [HDate], [Description]) VALUES (@HYear, @HDate, @Description)" SelectCommand="SELECT * FROM [Holidays] WHERE ([HYear] = @HYear) ORDER BY [HDate]" UpdateCommand="UPDATE [Holidays] SET [HYear] = @HYear, [HDate] = @HDate, [Description] = @Description WHERE [ID] = @ID"> <DeleteParameters> <asp:Parameter Name="ID" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="HYear" Type="Int32" /> <asp:Parameter DbType="Date" Name="HDate" /> <asp:Parameter Name="Description" Type="String" /> </InsertParameters> <SelectParameters> <asp:ControlParameter ControlID="txtYear" Name="HYear" PropertyName="Text" Type="Int32" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="HYear" Type="Int32" /> <asp:Parameter DbType="Date" Name="HDate" /> <asp:Parameter Name="Description" Type="String" /> <asp:Parameter Name="ID" Type="Int32" /> </UpdateParameters> </asp:SqlDataSource> </div> <div class="span4"> <h4>Add New Holiday</h4> <table> <tr><td>Year:</td><td><asp:TextBox ID="txtNewYear" runat="server" CssClass="form-control" style="margin-bottom: 5px;" ></asp:TextBox></td></tr> <tr><td>Date:</td><td><asp:TextBox ID="txtDate" runat="server" type="date" CssClass="form-control" style="margin-bottom: 5px;" ></asp:TextBox></td></tr> <tr><td>Description:</td><td><asp:TextBox runat="server" ID="txtDesc" CssClass="form-control" style="margin-bottom: 5px;" ></asp:TextBox></td></tr> <tr><td></td><td><asp:Button ID="BtnSubmit" runat="server" Text="Save" CssClass="btn btn-success" OnClick="BtnSubmit_Click" /></td></tr> </table> </div> </div> </div> </div> </form> </body> </html>
修改文件时间
将文件时间修改为当前时间的前一年
删除文件