protected void Page_Load(object sender, EventArgs e) { title = "排班管理"; Page.Title = title; if (!IsPostBack) { #region//默认属性初始化 dll_Year.Items.Clear(); dll_Month.Items.Clear(); DateTime dt = DateTime.Now; for (int y = dt.Year - 25; y < dt.Year + 25; y++) { dll_Year.Items.Add(new ListItem(y.ToString(), y.ToString())); } dll_Year.Value = dt.Year.ToString(); dll_Month.Items.Add(new ListItem("未选择", "0")); for (int y = 1; y < 13; y++) { dll_Month.Items.Add(new ListItem(y.ToString(), y.ToString())); } dll_Month.Value = dt.Month.ToString(); //dll_Day.Text = dt.Day.ToString(); dll_Type.Items.AddRange(FormHelper.GetListItem(HR_Scheduling.Attribute.SchType)); #endregion HR_SchClass con = new HR_SchClass(); con.OrderBy(HR_SchClass.Attribute.StartHour.FieldName + " desc "); con.OrderBy(false, HR_SchClass.Attribute.StartMin.FieldName + " desc "); List <HR_SchClass> schs = BLLTable <HR_SchClass> .Factory(conn).Select(new HR_SchClass(), con); repList.DataSource = schs; repList.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { title = "排班管理"; Page.Title = title; if (!IsPostBack) { #region//默认属性初始化 dll_Year.Items.Clear(); dll_Month.Items.Clear(); DateTime dt = DateTime.Now; for (int y = dt.Year - 25; y < dt.Year + 25; y++) { dll_Year.Items.Add(new ListItem(y.ToString(), y.ToString())); } dll_Year.Value = dt.Year.ToString(); dll_Month.Items.Add(new ListItem("未选择", "0")); for (int y = 1; y < 13; y++) { dll_Month.Items.Add(new ListItem(y.ToString(), y.ToString())); } dll_Month.Value = dt.Month.ToString(); //dll_Day.Text = dt.Day.ToString(); dll_Type.Items.AddRange(FormHelper.GetListItem(HR_Scheduling.Attribute.SchType)); #endregion HR_SchClass con = new HR_SchClass(); con.OrderBy(HR_SchClass.Attribute.StartHour.FieldName + " desc "); con.OrderBy(false, HR_SchClass.Attribute.StartMin.FieldName + " desc "); List<HR_SchClass> schs = BLLTable<HR_SchClass>.Factory(conn).Select(new HR_SchClass(), con); repList.DataSource = schs; repList.DataBind(); } }
private void LoadSCH() { HR_SchClass con = new HR_SchClass(); con.OrderBy(HR_SchClass.Attribute.StartHour, Order.Asc); con.OrderBy(HR_SchClass.Attribute.StartMin, Order.Asc); List <HR_SchClass> listObj = BLLTable <HR_SchClass> .Factory(conn).Select(new HR_SchClass(), con); repList.DataSource = listObj; repList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { title = "排班查看"; Page.Title = title; if (Request["staffid"] != null) { hidstaffid.Value = Request["staffid"]; } if (Request["deptid"] != null) { hiddeptid.Value = Request["deptid"]; } if (Request["orgid"] != null) { hidorgid.Value = Request["orgid"]; } if (Request["name"] != null) { title += "--" + System.Uri.UnescapeDataString(Request["name"]); hidname.Value = System.Uri.UnescapeDataString(Request["name"]); } else if (hidname.Value != "") title += System.Uri.UnescapeDataString(hidname.Value); else title += "--" + userBase.StaffName; if (!IsPostBack) { #region//默认属性初始化 dll_Year.Items.Clear(); dll_Month.Items.Clear(); DateTime dt = DateTime.Now; for (int y = dt.Year - 25; y < dt.Year + 25; y++) { dll_Year.Items.Add(new ListItem(y.ToString(), y.ToString())); } dll_Year.Value = dt.Year.ToString(); dll_Month.Items.Add(new ListItem("未选择", "0")); for (int y = 1; y < 13; y++) { dll_Month.Items.Add(new ListItem(y.ToString(), y.ToString())); } dll_Month.Value = dt.Month.ToString(); //dll_Day.Text = dt.Day.ToString(); dll_Type.Items.AddRange(FormHelper.GetListItem(HR_Scheduling.Attribute.SchType)); #endregion HR_SchClass con = new HR_SchClass(); con.OrderBy(new List<OrderByItem>(new OrderByItem[] { new OrderByItem(HR_SchClass.Attribute.StartHour, Order.Asc), new OrderByItem(HR_SchClass.Attribute.StartMin, Order.Asc), new OrderByItem(HR_SchClass.Attribute.EndHour, Order.Asc), new OrderByItem(HR_SchClass.Attribute.EndMin, Order.Asc) })); repList.DataSource = BLLTable<HR_SchClass>.Factory(conn).Select(new HR_SchClass(), con); repList.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { #region//默认隐藏的列 //hideTableColumnList = new List<AttributeItem>(); //hideTableColumnList.Add(HR_SchClass.Attribute.EXP1); //hideTableColumnList.Add(HR_SchClass.Attribute.EXP2); //hideTableColumnList.Add(HR_SchClass.Attribute.EXP3); //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要 //valObj.Remove(hideTableColumnList); //hideFindColumnList = new List<AttributeItem>(); //hideFindColumnList.Add(HR_SchClass.Attribute.EXP1); //hideFindColumnList.Add(HR_SchClass.Attribute.EXP2); //hideFindColumnList.Add(HR_SchClass.Attribute.EXP3); #endregion condObj.OrderBy(HR_SchClass.Attribute.SchClassid, Order.Desc); if (!IsPostBack) { btnFind.Text = LanguageService.GetLanguageString("btnFind", "查询"); aspPager.PageSize = 10; aspPager.CurrentPageIndex = 1; if (!string.IsNullOrEmpty(Request["ids"])) { HR_SchClass roleOld = new HR_SchClass(); roleOld.Where(HR_SchClass.Attribute.SchClassid, Request["ids"].ToString()); listObj = BLLTable <HR_SchClass> .Factory(conn).Select(valObj, roleOld); for (int i = 0; i < listObj.Count; i++) { if (i > 0) { hidOld.Value += ","; hidInitIDS.Value += ","; } hidOld.Value += "{ID:'" + listObj[i].SchClassid + "',Name:'" + listObj[i].SchClassid + "'}";//这里的Name用于显示在列表中,请自行重定义。 hidInitIDS.Value += listObj[i].SchClassid; } } try { listObj = BLLTable <HR_SchClass> .Factory(conn).SelectByPage(valObj, condObj, aspPager.PageSize, 1, ref recount); repList.DataSource = listObj; repList.DataBind(); aspPager.RecordCount = recount; } catch (Exception ex) { litWarn.Text = ex.Message; } } }
protected void Page_Load(object sender, EventArgs e) { title = "排班查看"; Page.Title = title; if (Request["staffid"] != null) { hidstaffid.Value = Request["staffid"]; } if (Request["deptid"] != null) { hiddeptid.Value = Request["deptid"]; } if (Request["orgid"] != null) { hidorgid.Value = Request["orgid"]; } if (Request["name"] != null) { title += "--" + System.Uri.UnescapeDataString(Request["name"]); hidname.Value = System.Uri.UnescapeDataString(Request["name"]); } else if (hidname.Value != "") { title += System.Uri.UnescapeDataString(hidname.Value); } else { title += "--" + userBase.StaffName; } if (!IsPostBack) { #region//默认属性初始化 dll_Year.Items.Clear(); dll_Month.Items.Clear(); DateTime dt = DateTime.Now; for (int y = dt.Year - 25; y < dt.Year + 25; y++) { dll_Year.Items.Add(new ListItem(y.ToString(), y.ToString())); } dll_Year.Value = dt.Year.ToString(); dll_Month.Items.Add(new ListItem("未选择", "0")); for (int y = 1; y < 13; y++) { dll_Month.Items.Add(new ListItem(y.ToString(), y.ToString())); } dll_Month.Value = dt.Month.ToString(); //dll_Day.Text = dt.Day.ToString(); dll_Type.Items.AddRange(FormHelper.GetListItem(HR_Scheduling.Attribute.SchType)); #endregion HR_SchClass con = new HR_SchClass(); con.OrderBy(new List <OrderByItem>(new OrderByItem[] { new OrderByItem(HR_SchClass.Attribute.StartHour, Order.Asc), new OrderByItem(HR_SchClass.Attribute.StartMin, Order.Asc), new OrderByItem(HR_SchClass.Attribute.EndHour, Order.Asc), new OrderByItem(HR_SchClass.Attribute.EndMin, Order.Asc) })); repList.DataSource = BLLTable <HR_SchClass> .Factory(conn).Select(new HR_SchClass(), con); repList.DataBind(); } }
private void LoadSCH() { HR_SchClass con = new HR_SchClass(); con.OrderBy(new List<OrderByItem>(new OrderByItem[] { new OrderByItem(HR_SchClass.Attribute.StartHour, Order.Asc), new OrderByItem(HR_SchClass.Attribute.StartMin, Order.Asc), new OrderByItem(HR_SchClass.Attribute.EndHour, Order.Asc), new OrderByItem(HR_SchClass.Attribute.EndMin, Order.Asc) })); List<HR_SchClass> listObj = BLLTable<HR_SchClass>.Factory(conn).Select(new HR_SchClass(), con); repList.DataSource = listObj; repList.DataBind(); }