文件操作 - ShiftReport.aspx.cs
返回文件管理
返回主菜单
删除本文件
文件: E:\HostingSpaces\kimblycr\guard.kimbly.in\wwwroot\ShiftReport.aspx.cs
编辑文件内容
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class ShiftReport : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { txtSDate.Text = DateTime.Today.ToString("dd-MMM-yy"); } } protected void DDLSites_SelectedIndexChanged(object sender, EventArgs e) { DDLShifts.DataBind(); } protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { int index = Convert.ToInt32(e.CommandArgument); Label LblRoute = GridView1.Rows[index].FindControl("lblRoute") as Label; string Route = LblRoute.Text; Label lblstime = GridView1.Rows[index].FindControl("lblstime") as Label; string stime = lblstime.Text; Label lbletime = GridView1.Rows[index].FindControl("lbleTime") as Label; string etime = lbletime.Text; SqlDataSource4.SelectParameters[0].DefaultValue = stime; SqlDataSource4.SelectParameters[1].DefaultValue = etime; SqlDataSource4.SelectParameters[2].DefaultValue = txtSDate.Text; SqlDataSource4.SelectParameters[3].DefaultValue = DDLSites.SelectedValue; GridView2.DataBind(); SqlDataSource5.SelectParameters[0].DefaultValue = stime; SqlDataSource5.SelectParameters[1].DefaultValue = etime; SqlDataSource5.SelectParameters[2].DefaultValue = txtSDate.Text; SqlDataSource5.SelectParameters[3].DefaultValue = DDLSites.SelectedValue; GridView3.DataBind(); } protected void BtnSearch_Click(object sender, ImageClickEventArgs e) { GridView1.DataBind(); } }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件