protected void Page_Load(object sender, EventArgs e) { #region//默认隐藏的列 //hideTableColumnList = new List<AttributeItem>(); //hideTableColumnList.Add(HR_Scheduling_IniProject.Attribute.EXP1); //hideTableColumnList.Add(HR_Scheduling_IniProject.Attribute.EXP2); //hideTableColumnList.Add(HR_Scheduling_IniProject.Attribute.EXP3); //valObj.LoadAllAttributes(true);//暂时加此代码,以后框架更新将不需要 //valObj.Remove(hideTableColumnList); //hideFindColumnList = new List<AttributeItem>(); //hideFindColumnList.Add(HR_Scheduling_IniProject.Attribute.EXP1); //hideFindColumnList.Add(HR_Scheduling_IniProject.Attribute.EXP2); //hideFindColumnList.Add(HR_Scheduling_IniProject.Attribute.EXP3); #endregion condObj.OrderBy(HR_Scheduling_IniProject.Attribute.ID, Order.Desc); if (!IsPostBack) { btnFind.Text = LanguageService.GetLanguageString("btnFind", "查询"); aspPager.PageSize = 10; aspPager.CurrentPageIndex = 1; if (!string.IsNullOrEmpty(Request["ids"])) { HR_Scheduling_IniProject roleOld = new HR_Scheduling_IniProject(); roleOld.Where(HR_Scheduling_IniProject.Attribute.ID, Request["ids"].ToString()); listObj = BLLTable <HR_Scheduling_IniProject> .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].ID + "',Name:'" + listObj[i].ID + "'}";//这里的Name用于显示在列表中,请自行重定义。 hidInitIDS.Value += listObj[i].ID; } } try { listObj = BLLTable <HR_Scheduling_IniProject> .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 = "排班生成管理"; if (Request["staffid"] != null) { hidstaffid.Value = Request["staffid"]; conIni.StaffID = Request["staffid"]; } if (Request["deptid"] != null) { hiddeptid.Value = Request["deptid"]; conIni.DeptID = Request["deptid"]; } if (Request["orgid"] != null) { hidorgid.Value = Request["orgid"]; conIni.OrgID = 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; } tbyWorkDayType.InnerHtml = System.Uri.UnescapeDataString(hidwdtype.Value); if (!IsPostBack) { DateTime dt = DateTime.Now; txtStartTime.Value = new DateTime(dt.Year, dt.Month, 1).ToString("yyyy-MM-dd"); txtEndTime.Value = new DateTime(dt.Year + 2, dt.Month, 1).ToString("yyyy-MM-dd"); //new DateTime(dt.Year, dt.Month, 1).AddYears(2).AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd"); txtXiuXi.Value = "6,7"; dll_Type.Items.AddRange(FormHelper.GetListItem(HR_Scheduling.Attribute.SchType)); LoadSCH(); //加载配置方案 HR_Scheduling_IniProject val = new HR_Scheduling_IniProject(); val.Top(3); val.OrderBy(HR_Scheduling_IniProject.Attribute.ID, Order.Desc); List <HR_Scheduling_IniProject> listIni = BLLTable <HR_Scheduling_IniProject> .Factory(conn).Select(val, conIni); if (listIni.Count > 0) { rptIniProject.DataSource = listIni; rptIniProject.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { title = "排班生成管理"; if (Request["staffid"] != null) { hidstaffid.Value = Request["staffid"]; conIni.StaffID = Request["staffid"]; } if (Request["deptid"] != null) { hiddeptid.Value = Request["deptid"]; conIni.DeptID = Request["deptid"]; } if (Request["orgid"] != null) { hidorgid.Value = Request["orgid"]; conIni.OrgID = 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; tbyWorkDayType.InnerHtml = System.Uri.UnescapeDataString(hidwdtype.Value); if (!IsPostBack) { DateTime dt = DateTime.Now; txtStartTime.Value = new DateTime(dt.Year, dt.Month, 1).ToString("yyyy-MM-dd"); txtEndTime.Value = new DateTime(dt.Year+2, dt.Month, 1).ToString("yyyy-MM-dd"); //new DateTime(dt.Year, dt.Month, 1).AddYears(2).AddMonths(1).AddSeconds(-1).ToString("yyyy-MM-dd"); txtXiuXi.Value = "6,7"; dll_Type.Items.AddRange(FormHelper.GetListItem(HR_Scheduling.Attribute.SchType)); LoadSCH(); //加载配置方案 HR_Scheduling_IniProject val = new HR_Scheduling_IniProject(); val.Top(3); val.OrderBy(HR_Scheduling_IniProject.Attribute.ID, Order.Desc); List<HR_Scheduling_IniProject> listIni = BLLTable<HR_Scheduling_IniProject>.Factory(conn).Select(val, conIni); if (listIni.Count > 0) { rptIniProject.DataSource = listIni; rptIniProject.DataBind(); } } }