protected void Page_Load(object sender, EventArgs e) { if (!Ext.IsAjaxRequest) { //初始化模块权限 UserHandle.InitModule(this.PageTag); //是否有浏览权限 if (UserHandle.ValidationHandle(PermissionTag.Browse)) { int year = DateTime.Today.Year; for (int i = 2013; i <= year; i++) { cboYear.Items.Add(new Coolite.Ext.Web.ListItem(i.ToString(), i.ToString())); } cboYear.SelectedItem.Value = DateTime.Today.Year.ToString(); cboMonth.SelectedItem.Value = (DateTime.Today.Month - 1).ToString(); InitDept(); Changed(); } else { Response.Redirect("~/Login.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { //初始化模块权限 UserHandle.InitModule(this.PageTag); //是否有浏览权限 if (UserHandle.ValidationHandle(PermissionTag.Browse)) { GridViewCommandColumn colEdit = (GridViewCommandColumn)ASPxGridView2.Columns["操作"]; if (!UserHandle.ValidationHandle(PermissionTag.Add)) { colEdit.NewButton.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Edit)) { colEdit.EditButton.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Delete)) { colEdit.DeleteButton.Visible = false; } } } } bindFXLX(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { //初始化模块权限 UserHandle.InitModule(this.PageTag); //是否有浏览权限 if (UserHandle.ValidationHandle(PermissionTag.Browse)) { GridViewCommandColumn colEdit = (GridViewCommandColumn)gridRole.Columns["编辑"]; if (!UserHandle.ValidationHandle(PermissionTag.Add)) { colEdit.NewButton.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Edit)) { colEdit.EditButton.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Delete)) { colEdit.DeleteButton.Visible = false; } SF_Role r = rbll.GetRoleModel(decimal.Parse(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0])); rolelevel = r.LevelID; maindeptid = SessionBox.GetUserSession().DeptNumber; switch ((int)rolelevel) { case 0: Session["WhereRole"] = " "; break; case 1: Session["WhereRole"] = string.Format("levelid >={0}", rolelevel); break; case 2: Session["WhereRole"] = string.Format("MAINDEPTID='{0}'", maindeptid); gridRole.Columns["创建单位"].Visible = false; break; default: Session["WhereRole"] = string.Format("MAINDEPTID='{0}'", maindeptid); gridRole.Columns["创建单位"].Visible = false; break; } BindRole(); } } } //if(rolelevel > 1) //{ // Session["WhereRole"] = string.Format("MAINDEPTID='{0}'",maindeptid); //} }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { UserHandle.InitModule(this.PageTag); //初始化此模块的权限。 if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限 { if (!UserHandle.ValidationHandle(PermissionTag.Delete)) { btnBatchDelete.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Search)) { btnSearch.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Export)) { btnExportLog.Visible = false; } } else { Session["ErrorNum"] = "0"; Response.Redirect("~/Error.aspx"); } InitData(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { //初始化模块权限 UserHandle.InitModule(this.PageTag); //是否有浏览权限 if (UserHandle.ValidationHandle(PermissionTag.Browse)) { TreeListCommandColumn colEdit = (TreeListCommandColumn)InfoTree.Columns["操作"]; if (!UserHandle.ValidationHandle(PermissionTag.Add)) { colEdit.NewButton.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Edit)) { colEdit.EditButton.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Delete)) { colEdit.DeleteButton.Visible = false; } } } } Session["strWhere"] = ""; lbl_DepartName.Text = SessionBox.GetUserSession().DeptName;//需要加权限调用 lbl_DepartName.ForeColor = System.Drawing.Color.Red; }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { UserHandle.InitModule(this.PageTag); //初始化此模块的权限。 if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限 { InitData(); if (!UserHandle.ValidationHandle(PermissionTag.Edit)) { btnDisable.Visible = false; btnEnable.Visible = false; DepTreeList.Columns["操作"].Visible = false; } } else { Session["ErrorNum"] = "0"; Response.Redirect("~/Error.aspx"); } } }
protected void Page_PreRenderComplete(object sender, EventArgs e) { if (!IsPostBack) { cboModuleGroup.Items.Insert(0, new DevExpress.Web.ASPxEditors.ListEditItem("--全部--", -1)); cboModuleGroup.SelectedIndex = 0; if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { //初始化模块权限 UserHandle.InitModule(this.PageTag); //是否有浏览权限 if (UserHandle.ValidationHandle(PermissionTag.Browse)) { GridViewCommandColumn colDel = (GridViewCommandColumn)ASPxGridView1.Columns["删除"]; GridViewDataHyperLinkColumn colEdit = (GridViewDataHyperLinkColumn)ASPxGridView1.Columns["编辑"]; if (!UserHandle.ValidationHandle(PermissionTag.Add)) { btnAddModule.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Edit)) { colEdit.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Delete)) { colDel.Visible = false; } } } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { UserHandle.InitModule(this.PageTag); if (UserHandle.ValidationHandle(PermissionTag.Browse))//是否有浏览权限 { } else { Session["ErrorNum"] = "0"; Response.Redirect("~/Error.aspx"); } } } Session["strWhere"] = ""; //需要初始化单位 //StringBuilder strSql = new StringBuilder(); //strSql.Append("select * from Department"); //DataSet ds = OracleHelper.Query(strSql.ToString()); //cbbPDepart.DataSource = ds; //cbbPDepart.TextField = "DEPTNAME"; //cbbPDepart.ValueField = "DEPTNUMBER"; //cbbPDepart.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Admin/Login.aspx"); } else { //初始化模块权限 UserHandle.InitModule("Mod_Modules"); if (!IsPostBack) { btn_save.Attributes.Add("onclick", "return CheckAdd()"); //加入验证 btn_update.Attributes.Add("onclick", "return CheckAdd()"); //加入验证 BindTypeOrder(); BindOrder(); #region 语言加入 btn_add.Text = ResourceManager.GetString("Pub_Btn_add"); btn_update.Text = ResourceManager.GetString("Pub_Btn_update"); btn_save.Text = ResourceManager.GetString("Pub_Btn_save"); btn_cancel.Text = ResourceManager.GetString("Pub_Btn_cancel"); txt_state.Items[0].Text = ResourceManager.GetString("Pub_State_open"); txt_state.Items[1].Text = ResourceManager.GetString("Pub_State_close"); IsMenu.Items[0].Text = ResourceManager.GetString("Pub_State_visible"); IsMenu.Items[1].Text = ResourceManager.GetString("Pub_State_invisible"); #endregion } } }
protected void Page_Load(object sender, EventArgs e) //已改 { if (!Ext.IsAjaxRequest) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { UserHandle.InitModule(this.PageTag); //初始化此模块的权限。 if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限 { if (!UserHandle.ValidationHandle(PermissionTag.SW_xxcl)) //三违处理权限 { Button1.Visible = false; //Button2.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Delete))//三违删除权限 { Button2.Visible = false; } } SearchLoad(); try { string[] strgroup = Request.QueryString["SWIDgroup"].Trim().Split(','); decimal[] dgroup; if (strgroup.Length == 0) { dgroup = new decimal[] { -1 }; } else { dgroup = new decimal[strgroup.Length]; for (int i = 0; i < strgroup.Length; i++) { dgroup[i] = decimal.Parse(strgroup[i]); } } var data = from sw in dc.Getsanwei where dgroup.Contains(sw.Id) select sw; Store1.DataSource = data;//dc.GetSWbyIDgroup(Request["SWIDgroup"].Trim()); Store1.DataBind(); btn_detail.Disabled = true; Button1.Disabled = true; Button2.Disabled = true; } catch { storeload(); } } } }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { List <string> lstRole = new List <string>(); lstRole.Add("2"); lstRole.Add("46"); if (SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "31") { //var data = from p in db.Person // select p; //GridView.DataSource = data; //GridView.DataBind(); //GridView.KeyFieldName = "Personid"; } else if (lstRole.Contains(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0])) { //var data = from p in db.Person // select p; //GridView.DataSource = data; //GridView.DataBind(); //GridView.KeyFieldName = "Personid"; } else { //var data = from p in db.Person // where p.Maindeptid == SessionBox.GetUserSession().DeptNumber // select p; //GridView.DataSource = data; //GridView.DataBind(); //GridView.KeyFieldName = "Personid"; //adsPerson.Where = "Maindeptid == \"" + SessionBox.GetUserSession().DeptNumber + "\""; //adsDept.Where = "Deptnumber.StartsWith(\"" + SessionBox.GetUserSession().DeptNumber.Remove(4) + "\")"; //adsPosition.Where = "Maindeptid == \"" + SessionBox.GetUserSession().DeptNumber + "\""; Session["maindeptid"] = SessionBox.GetUserSession().DeptNumber; Session["deptid"] = SessionBox.GetUserSession().DeptNumber.Remove(4); Session["PosDept"] = SessionBox.GetUserSession().DeptNumber; } //初始化模块权限 UserHandle.InitModule(this.PageTag); //是否有浏览权限 if (UserHandle.ValidationHandle(PermissionTag.Browse)) { GridViewCommandColumn colEdit = (GridViewCommandColumn)GridView.Columns["操作"]; if (!UserHandle.ValidationHandle(PermissionTag.Edit)) { colEdit.EditButton.Visible = false; } } } }
protected void Page_Load(object sender, EventArgs e) { if (!Ext.IsAjaxRequest) { //初始化模块权限 UserHandle.InitModule(this.PageTag); //是否有浏览权限 if (UserHandle.ValidationHandle(PermissionTag.Browse)) { SearchLoad(); //storeload(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Admin/Login.aspx"); } else { //初始化模块权限 UserHandle.InitModule("Mod_Config"); if (!IsPostBack) { BindOrder(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } //初始化模块权限 UserHandle.InitModule(this.PageTag); //是否有浏览权限 if (UserHandle.ValidationHandle(PermissionTag.Browse)) { //gvPlace.GroupBy(gvPlace.Columns["Pareasid"]); GridViewCommandColumn colEdit = (GridViewCommandColumn)gvPlace.Columns["编辑"]; if (!UserHandle.ValidationHandle(PermissionTag.Add)) { colEdit.NewButton.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Edit)) { colEdit.EditButton.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Delete)) { colEdit.DeleteButton.Visible = false; } } } List <string> lstRole = new List <string>(); lstRole.Add("2"); lstRole.Add("46"); if (SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "31") { } else if (lstRole.Contains(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0])) { } else { adsPlace.Where = "Maindeptid == \"" + SessionBox.GetUserSession().DeptNumber + "\"";//&& Placestatus=1"; adsPlaceAreas.Where = "Maindeptid == \"" + SessionBox.GetUserSession().DeptNumber + "\""; } }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Admin/Login.aspx"); } else { //初始化模块权限 UserHandle.InitModule("Mod_ModuleType"); if (!IsPostBack) { btn_add.Attributes.Add("onclick", "return CheckAdd()");//加入验证 BindOrder(); #region 语言加入 btn_add.Text = ResourceManager.GetString("Pub_Btn_add"); #endregion } } }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { UserHandle.InitModule(this.PageTag); //初始化此模块的权限。 if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限 { if (!UserHandle.ValidationHandle(PermissionTag.Add)) //新增 { btn_S.Visible = false; btn_D.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Publish))//发布 { btn_FaBu.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Delete))//删除 { btn_Delete.Visible = false; } } if (!Ext.IsAjaxRequest) { NidLoad.Text = ""; pnlAnnex.Disabled = true; pnlAnnex.Html = "请上传附件!"; btn_Delete.Disabled = true; btn_FaBu.Disabled = true; dfBegin.SelectedDate = System.DateTime.Today.AddDays(-7); dfEnd.SelectedDate = System.DateTime.Today; //数据绑定 storeload(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Admin/Login.aspx"); } else { //初始化模块权限 UserHandle.InitModule("Mod_Roles"); if (!IsPostBack) { btn_add.Attributes.Add("onclick", "return CheckAdd()");//加入验证 #region 语言加入 btn_add.Text = ResourceManager.GetString("Pub_Btn_add"); //绑定组信息 RedGlovePermission.BLL.RGP_Groups Groupbll = new RedGlovePermission.BLL.RGP_Groups(); DataSet groupds = Groupbll.GetGroupList("", "order by GroupOrder asc"); for (int i = 0; i < groupds.Tables[0].Rows.Count; i++) { string s = groupds.Tables[0].Rows[i]["GroupName"].ToString(); if (ResourceManager.GetString(s) != "") { GroupList.Items.Add(new ListItem(ResourceManager.GetString(s), groupds.Tables[0].Rows[i]["GroupID"].ToString())); } else { GroupList.Items.Add(new ListItem(s, groupds.Tables[0].Rows[i]["GroupID"].ToString())); } } #endregion BindOrder(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Admin/Login.aspx"); } else { //初始化模块权限 UserHandle.InitModule("Mod_RoleAuthority"); if (!IsPostBack) { BindGroups(); BindModuleType(); BindRoles(); #region 语言加入 btn_AllSave.Text = ResourceManager.GetString("RoleAuthorizedPage_Btn_saveall"); #endregion } } }
protected void Page_Load(object sender, EventArgs e) { if (!Ext.IsAjaxRequest) { //初始化模块权限 UserHandle.InitModule(this.PageTag); //是否有浏览权限 if (UserHandle.ValidationHandle(PermissionTag.Browse)) { storeload(); btnLookRoute.Disabled = true; if (!UserHandle.ValidationHandle(PermissionTag.Add)) { btnNew.Visible = false; Button4.Visible = false; btnPlaceAdd.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Delete)) { btnPlaceDel.Visible = false; btnDel.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Move)) { btnUp.Visible = false; btnDown.Visible = false; } //如果拥有处理个人信息权限 if (UserHandle.ValidationHandle(PermissionTag.PersonalOnly)) { cbbPerson.Disabled = true; } BaseSet(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { UserHandle.InitModule(this.PageTag); //初始化此模块的权限。 if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限 { txtSender.Text = "调度所"; GetPersonList(); } else { Session["ErrorNum"] = "0"; Response.Redirect("~/Error.aspx"); } } } }
private void storeload() //执行查询 已改 { UserHandle.InitModule(this.PageTag); //初始化此模块的权限。 var data = from sw in dc.Getsanwei select sw; if (UserHandle.ValidationHandle(PermissionTag.SW_xxcl)) //三违处理权限 { data = data.Where(p => p.Dwid == SessionBox.GetUserSession().DeptNumber); } else if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限 { data = data.Where(p => p.Pcpersonid == SessionBox.GetUserSession().PersonNumber || p.Swpersonid == SessionBox.GetUserSession().PersonNumber); } if (!df_begin.IsNull) { data = data.Where(p => p.Pctime >= df_begin.SelectedDate); } if (!df_end.IsNull) { data = data.Where(p => p.Pctime <= df_end.SelectedDate); } if (cbb_part.SelectedIndex > -1) { data = data.Where(p => p.Kqid == cbb_part.SelectedItem.Value.Trim()); } if (cbb_lavel.SelectedIndex > -1) { data = data.Where(p => p.Levelid == decimal.Parse(cbb_lavel.SelectedItem.Value.Trim())); } Store1.DataSource = data; Store1.DataBind(); btn_detail.Disabled = true; Button1.Disabled = true; Button2.Disabled = true; }
private void storeload()//执行查询 { var data = from ct in dc.YChargetable from p in dc.Person from d in dc.Department from d1 in dc.Department where ct.Cperson == p.Personnumber && p.Deptid == d.Deptnumber && ct.Maindept == d1.Deptnumber //&& ct.Maindept == SessionBox.GetUserSession().DeptNumber orderby ct.Cdate descending select new { ct.Recordtime, ct.Cdate, ct.Cbanci, ct.Cperson, ct.Maindept, ct.Rperson, ct.Status, p.Name, d.Deptname, Maindeptname = d1.Deptname, ct.Id }; if (SessionBox.GetUserSession().rolelevel.Contains("1") || SessionBox.GetUserSession().rolelevel.Contains("0")) { } else { //初始化模块权限 UserHandle.InitModule(this.PageTag); //如果拥有处理个人信息权限 if (UserHandle.ValidationHandle(PermissionTag.PersonalOnly)) { data = data.Where(p => p.Cperson == SessionBox.GetUserSession().PersonNumber); } else if (UserHandle.ValidationHandle(PermissionTag.Deptall)) { data = data.Where(p => p.Maindept == SessionBox.GetUserSession().DeptNumber); } else { data = data.Where(p => false); } } if (cbbDept.SelectedIndex > 0) { data = data.Where(p => p.Maindept == cbbDept.SelectedItem.Value); } if (cx_date.SelectedValue != null) { data = data.Where(p => p.Cdate == cx_date.SelectedDate); } if (cx_banci.SelectedIndex != -1) { data = data.Where(p => p.Cbanci == cx_banci.SelectedItem.Value); } Store1.DataSource = data; Store1.DataBind(); RowSelectionModel sm = this.GridPanel1.SelectionModel.Primary as RowSelectionModel; sm.SelectedRows.Clear(); sm.UpdateSelection(); btnPlan.Disabled = true; btnDel.Disabled = true; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //Aspose.Cells.License license = new Aspose.Cells.License(); //license.SetLicense("License.lic"); if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { SF_Role r = Rolebll.GetRoleModel(decimal.Parse(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0])); rolelevel = (int)r.LevelID; maindeptid = SessionBox.GetUserSession().DeptNumber; switch ((int)rolelevel) { case 0: //Session["WhereRole"] = string.Format(" levelid >={0}", rolelevel); InitRole(string.Format(" levelid >={0}", rolelevel)); InitUserGroup(""); break; case 1: //Session["WhereRole"] = string.Format(" levelid >={0}", rolelevel); InitRole(string.Format(" levelid >={0}", rolelevel)); InitUserGroup(""); break; case 2: //Session["WhereRole"] = string.Format("MAINDEPTID='{0}' or (maindeptid='{1}' and levelid>={2})", SessionBox.GetUserSession().DeptNumber, "000000000", rolelevel.ToString()); //Session["WhereUserGroup"] = "usergroupid not in(2,3,23)"; InitRole(string.Format("MAINDEPTID='{0}' or (maindeptid='{1}' and levelid>={2})", SessionBox.GetUserSession().DeptNumber, "000000000", rolelevel.ToString())); InitUserGroup("usergroupid not in(2,3,23)"); break; default: //Session["WhereRole"] = string.Format("MAINDEPTID='{0}' or (maindeptid='{1}' and levelid>={2})", SessionBox.GetUserSession().DeptNumber, "000000000", rolelevel.ToString()); //Session["WhereUserGroup"] = "usergroupid not in(2,3,23)"; InitRole(string.Format("MAINDEPTID='{0}' or (maindeptid='{1}' and levelid>={2})", SessionBox.GetUserSession().DeptNumber, "000000000", rolelevel.ToString())); InitUserGroup("usergroupid not in(2,3,23)"); break; } UserHandle.InitModule(this.PageTag); //初始化此模块的权限。 if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限 { //UserHandle.BindDropDownList(ddlUserGroup, 0); //DevExpress.Web.ASPxGridView.GridViewCommandColumn colEdit = (DevExpress.Web.ASPxGridView.GridViewCommandColumn)gridUser.Columns["编辑"]; //DevExpress.Web.ASPxGridView.GridViewCommandColumn colDel = (DevExpress.Web.ASPxGridView.GridViewCommandColumn)gridUser.Columns["删除"]; if (!UserHandle.ValidationHandle(PermissionTag.Add)) { btnAddUser.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Edit)) { gridUser.Columns["编辑"].Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Delete)) { gridUser.Columns["删除"].Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Search)) { btnSearch.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.BatchEditRole)) { btnEditRole.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.BatchEditUsergroup)) { btnEditUsergroup.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.ResetPassword)) { gridUser.Columns["密码重置"].Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.ImportUser)) { btnBatchAddUser.Visible = false; } } else { Session["ErrorNum"] = "0"; Response.Redirect("~/Error.aspx"); } InitData(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Ext.IsAjaxRequest) { UserHandle.InitModule(this.PageTag); //初始化此模块的权限。 if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限 { dfBegin.SelectedDate = System.DateTime.Today.AddDays(1 - System.DateTime.Today.Day); dfEnd.SelectedDate = System.DateTime.Today; //dfBegin.MaxDate = System.DateTime.Today; //dfEnd.MaxDate = System.DateTime.Today; #region 初始化单位 MainDeptStore.DataSource = PublicCode.GetMaindept(""); MainDeptStore.DataBind(); KQStore.DataSource = PublicCode.GetKQdept(SessionBox.GetUserSession().DeptNumber); KQStore.DataBind(); if (SessionBox.GetUserSession().rolelevel.Contains("1") || SessionBox.GetUserSession().rolelevel.Contains("0")) { cbbKQ.Disabled = true; } else { cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber; cbbMianDept.Disabled = true; } #endregion //LoadData(); if (UserHandle.ValidationHandle(PermissionTag.SearchAll)) { cbbMianDept.Disabled = false; cbbKQ.Disabled = false; btnSearch.Disabled = false; } else if (UserHandle.ValidationHandle(PermissionTag.SearchMainDept)) { cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber; cbbMianDept.Disabled = true; cbbKQ.Disabled = false; btnSearch.Disabled = false; } else if (UserHandle.ValidationHandle(PermissionTag.SearchDept)) { cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber; cbbMianDept.Disabled = true; cbbKQ.SelectedItem.Value = PublicCode.GetKQdeptNumber(SessionBox.GetUserSession().PersonNumber); cbbKQ.Disabled = true; btnSearch.Disabled = false; } else if (UserHandle.ValidationHandle(PermissionTag.SearchPersonal)) { cbbMianDept.SelectedItem.Value = SessionBox.GetUserSession().DeptNumber; cbbMianDept.Disabled = true; cbbKQ.SelectedItem.Value = PublicCode.GetKQdeptNumber(SessionBox.GetUserSession().PersonNumber); cbbKQ.Disabled = true; btnSearch.Disabled = false; } else { btnSearch.Disabled = true; } } else { Session["ErrorNum"] = "0"; Response.Redirect("~/Error.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Ext.IsAjaxRequest) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { UserHandle.InitModule(this.PageTag); //初始化此模块的权限。 if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限 { if (!UserHandle.ValidationHandle(PermissionTag.Add)) //引用 { btn_yy.Visible = false; //引用 btn_Sure.Visible = false; //全部引用 btn_C.Visible = false; //全部取消 btn_cancel.Visible = false; //取消 } if (!UserHandle.ValidationHandle(PermissionTag.Edit)) //保存 { btn_Save.Visible = false; } BuildTree(); Bindcombox(int.Parse(PublicMethod.ReadXmlReturnNode("SGLX", this)), bmStore1); Bindcombox(int.Parse(PublicMethod.ReadXmlReturnNode("FXDJ", this)), bmStore2); Bindcombox(int.Parse(PublicMethod.ReadXmlReturnNode("FXLX", this)), bmStore3); string ren = PublicMethod.ReadXmlReturnNode("REN", this) + "," + PublicMethod.ReadXmlReturnNode("GUAN", this); //bindGLDX(ren, Store1); bindGLDX(ren, Store2); bindGLDX(ren, Store3); bindGLDX(ren, Store4); Bindcombox(int.Parse(PublicMethod.ReadXmlReturnNode("SWJB", this)), bmStore5); Bindcombox(int.Parse(PublicMethod.ReadXmlReturnNode("YHJB", this)), bmStore4); GridPanel1.Hide(); Panel1.Hide(); //首页待办连接处理-周义生 if (Request.QueryString["H_YY"] != null) { tpZY.Hide(); bindH_YY(); GridPanel1.Show(); btn_Sure.Hide(); btn_C.Hide(); } } else { Session["ErrorNum"] = "0"; Response.Redirect("~/Error.aspx"); } btn_Save.Disabled = true; btn_yy.Disabled = true; btn_cancel.Disabled = true; } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { SF_Role r = Rolebll.GetRoleModel(decimal.Parse(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0])); rolelevel = (int)r.LevelID; roledeptid = SessionBox.GetUserSession().DeptNumber; switch ((int)rolelevel) { case 0: Session["WhereRole"] = "ROLESTATUS=1"; break; case 1: Session["WhereRole"] = string.Format("levelid >={0} and ROLESTATUS=1", rolelevel); break; case 2: Session["WhereRole"] = string.Format("MAINDEPTID='{0}' and ROLESTATUS=1", roledeptid); break; default: Session["WhereRole"] = string.Format("MAINDEPTID='{0}' and ROLESTATUS=1", roledeptid); break; } //if (rolelevel > 1) //{ // Session["WhereRole"] = string.Format("MAINDEPTID='{0}'", SessionBox.GetUserSession().DeptNumber); //} //List<string> lstRole = new List<string>(); //lstRole.Add("2"); //lstRole.Add("46"); //if (SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "31") //{ // Session["WhereRole"] = " "; //} //else if (lstRole.Contains(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0])) //{ // Session["WhereRole"] = "roleid != 31"; //} //else //{ // Session["WhereRole"] = "roleid NOT in(2,31,46)"; //} //初始化模块权限 UserHandle.InitModule(this.PageTag); if (UserHandle.ValidationHandle(PermissionTag.Browse))//是否有浏览权限 { BindModule(); if (!UserHandle.ValidationHandle(PermissionTag.Edit)) { gvModuleOperator.Columns[2].Visible = false; } } else { Session["ErrorNum"] = "0"; Response.Redirect("~/Error.aspx"); } } } }
protected void Page_Load(object sender, EventArgs e) //已改 { if (!Ext.IsAjaxRequest) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { UserHandle.InitModule(this.PageTag); //初始化此模块的权限。 if (UserHandle.ValidationHandle(PermissionTag.Browse)) //是否有浏览权限 { if (!UserHandle.ValidationHandle(PermissionTag.SW_xxcl)) //三违处理权限 { Button1.Visible = false; //Button2.Visible = false; } if (!UserHandle.ValidationHandle(PermissionTag.Delete))//三违删除权限 { Button2.Visible = false; } } SearchLoad(); try { string[] strgroup = Request.QueryString["SWIDgroup"].Trim().Split(','); decimal[] dgroup; if (strgroup.Length == 0) { dgroup = new decimal[] { -1 }; } else { dgroup = new decimal[strgroup.Length]; for (int i = 0; i < strgroup.Length; i++) { dgroup[i] = decimal.Parse(strgroup[i]); } } var data = from sw in dc.Nswinput from ha in dc.Getswandhazusing from per1 in dc.Person from per2 in dc.Person from dep in dc.Department join pl in dc.Place on sw.Placeid equals pl.Placeid into gg from ga in gg.DefaultIfEmpty() where sw.Swid == ha.Swid && sw.Pcpersonid == per1.Personnumber && sw.Swpersonid == per2.Personnumber && ha.Deptnumber == SessionBox.GetUserSession().DeptNumber && per2.Deptid == dep.Deptnumber orderby sw.Intime descending select new { sw.Id, Swperson = per2.Name, Kqid = dep.Deptnumber, Kqname = dep.Deptname, ha.Swcontent, ha.Levelid, ha.Levelname, Placename = ga.Placename == null ? "已删除" : ga.Placename, sw.Banci, Pcname = per1.Name, PCTime = sw.Pctime, PCname = per1.Name, Name = per2.Name, Ispublic = sw.Ispublic == 1, Isend = sw.Isend.Value == 1, sw.Jctype, sw.Remarks, sw.Intime //袁一矿提出报表添加报送时间 }; Store1.DataSource = data;//dc.GetSWbyIDgroup(Request["SWIDgroup"].Trim()); Store1.DataBind(); btn_detail.Disabled = true; Button1.Disabled = true; Button2.Disabled = true; } catch { storeload(); } } } }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Admin/Login.aspx"); } else { UserHandle.InitModule("Mod_Control");//初始化模块权限 //浏览权限 if (UserHandle.ValidationHandle(RGP_Tag.Browse)) { Label1.Text = ResourceManager.GetString("Pub_State_open"); } else { Label1.Text = ResourceManager.GetString("Pub_State_close"); } //新增权限 if (UserHandle.ValidationHandle(RGP_Tag.Add)) { Label2.Text = ResourceManager.GetString("Pub_State_open"); } else { Label2.Text = ResourceManager.GetString("Pub_State_close"); } //编辑权限 if (UserHandle.ValidationHandle(RGP_Tag.Edit)) { Label3.Text = ResourceManager.GetString("Pub_State_open"); } else { Label3.Text = ResourceManager.GetString("Pub_State_close"); } //删除权限 if (UserHandle.ValidationHandle(RGP_Tag.Delete)) { Label4.Text = ResourceManager.GetString("Pub_State_open"); } else { Label4.Text = ResourceManager.GetString("Pub_State_close"); } //搜索权限 if (UserHandle.ValidationHandle(RGP_Tag.Search)) { Label5.Text = ResourceManager.GetString("Pub_State_open"); } else { Label5.Text = ResourceManager.GetString("Pub_State_close"); } //审核权限 if (UserHandle.ValidationHandle(RGP_Tag.Verify)) { Label6.Text = ResourceManager.GetString("Pub_State_open"); } else { Label6.Text = ResourceManager.GetString("Pub_State_close"); } //移动权限 if (UserHandle.ValidationHandle(RGP_Tag.Move)) { Label7.Text = ResourceManager.GetString("Pub_State_open"); } else { Label7.Text = ResourceManager.GetString("Pub_State_close"); } //打印权限 if (UserHandle.ValidationHandle(RGP_Tag.Print)) { Label8.Text = ResourceManager.GetString("Pub_State_open"); } else { Label8.Text = ResourceManager.GetString("Pub_State_close"); } //下载权限 if (UserHandle.ValidationHandle(RGP_Tag.Download)) { Label9.Text = ResourceManager.GetString("Pub_State_open"); } else { Label9.Text = ResourceManager.GetString("Pub_State_close"); } //备份权限 if (UserHandle.ValidationHandle(RGP_Tag.back)) { Label10.Text = ResourceManager.GetString("Pub_State_open"); } else { Label10.Text = ResourceManager.GetString("Pub_State_close"); } } }
public void SetDBSY() { string text = "<ul>"; //最新动态 bool bl = false; //string yhText = GetLastHYInfo(DateTime.Now.Date); #region 隐患信息待办 //获取当前待处理隐患 UserHandle.InitModule("YSNewProcess_YHProcess"); string PerID = SessionBox.GetUserSession().PersonNumber; string DepID = SessionBox.GetUserSession().DeptNumber; string DepIDK = GetDeptIDViaPersonNumber(SessionBox.GetUserSession().PersonNumber); string sql = "SELECT sum(CASE WHEN t.STATUS='新增' THEN 1 ELSE 0 END) XZYH,sum(CASE WHEN (t.STATUS='提交审批' AND t.REFER=1 AND t.REFERID='{0}') THEN 1 ELSE 0 END) LDSP, sum(CASE WHEN (t.STATUS='提交审批' AND t.REFER=2 AND t.REFERID='{1}') THEN 1 ELSE 0 END) ZNKSSP, sum(CASE WHEN (t.STATUS='隐患未整改' AND ch.RESPONSIBLEDEPT='{1}') THEN 1 ELSE 0 END) DZGYH, sum(CASE WHEN (t.STATUS='隐患已整改' AND m.MOVESTARTTIME<sysdate AND m.ENDTIME>sysdate) THEN 1 ELSE 0 END) DFCYH, sum(CASE WHEN t.STATUS='逾期未整改' THEN 1 ELSE 0 END) YQWZG,sum(CASE WHEN t.STATUS='复查未通过' THEN 1 ELSE 0 END) FCWTG FROM NYHINPUT t LEFT JOIN Moveplan m ON (t.PLACEID=m.PLACEID AND m.MOVESTATE='未走动' AND m.PERSONID='{0}') LEFT JOIN Nyinhuancheck ch ON t.YHPUTINID=ch.YHPUTINID WHERE t.MAINDEPTID='{2}'"; DataTable dt = OracleHelper.Query(string.Format(sql, PerID, DepIDK, DepID)).Tables[0]; //DataTable dt = SlowHelper.GetDBSY(PerID, DepIDK, DepID); if (decimal.Parse(dt.Rows[0]["XZYH"].ToString()) > 0 && (UserHandle.ValidationHandle(PermissionTag.YH_fbtj) || UserHandle.ValidationHandle(PermissionTag.YH_bhxz))) {//发布或闭合新增 bl = true; text += string.Format("<li><span><a href={1}>{0}条</a></span>当前,您有待处理新增隐患信息:</li>", dt.Rows[0]["XZYH"].ToString(), "YSNewProcess/YHProcess.aspx?YHState=" + Server.UrlEncode("新增")); } if (decimal.Parse(dt.Rows[0]["LDSP"].ToString()) > 0 && UserHandle.ValidationHandle(PermissionTag.YH_kldsh)) { //提交领导审批 bl = true; string[] countYHdsp = MainData.getYHDSP_kld(PerID, DepID); //待审批 text += string.Format("<li><span><a href={1}>{0}条</a></span>当前,您有领导审批的隐患信息:</li>", countYHdsp[0], "YSNewProcess/YHProcess.aspx?YHIDgroup=" + countYHdsp[1]); } if (decimal.Parse(dt.Rows[0]["ZNKSSP"].ToString()) > 0 && UserHandle.ValidationHandle(PermissionTag.YH_znkssh)) {//提交职能科室审批 bl = true; string[] countYHdsp = MainData.getYHDSP_znks(PerID, DepIDK); text += string.Format("<li><span><a href={1}>{0}条</a></span>当前,您有职能科室审批的隐患信息:</li>", countYHdsp[0], "YSNewProcess/YHProcess.aspx?YHIDgroup=" + countYHdsp[1]); } if (decimal.Parse(dt.Rows[0]["DZGYH"].ToString()) > 0 && UserHandle.ValidationHandle(PermissionTag.YH_zgfk)) {//责任部门需要反馈 bl = true; //string[] countYHwzg = MainData.getYHWZG_zrbmw(PerID, DepIDK);//未整改 text += string.Format("<li><span><a href={1}>{0}条</a></span>当前,您单位需要整改的隐患信息:</li>", dt.Rows[0]["DZGYH"].ToString(), "YSNewProcess/YHProcess.aspx"); } if (decimal.Parse(dt.Rows[0]["DFCYH"].ToString()) > 0 && UserHandle.ValidationHandle(PermissionTag.YH_fcfk)) { //走动干部需要复查 bl = true; string[] countYHdfc = MainData.getYHDFC_zdgb(PerID, DepID); //待复查 text += string.Format("<li><span><a href={1}>{0}条</a></span>当前,您有‘待复查’的隐患信息:</li>", countYHdfc[0], "YSNewProcess/YHProcess.aspx?YHIDgroup=" + countYHdfc[1]); } if (UserHandle.ValidationHandle(PermissionTag.YH_fjpccl))//拥有分级排查权限--安监人员 { if (decimal.Parse(dt.Rows[0]["YQWZG"].ToString()) > 0) { bl = true; text += string.Format("<li><span><a href={1}>{0}条</a></span>当前,您有待处理逾期未整改隐患信息:</li>", dt.Rows[0]["YQWZG"].ToString(), "YSNewProcess/YHProcess.aspx?YHState=" + Server.UrlEncode("逾期未整改")); } if (decimal.Parse(dt.Rows[0]["FCWTG"].ToString()) > 0) { bl = true; text += string.Format("<li><span><a href={1}>{0}条</a></span>当前,您有待处理复查未通过隐患信息:</li>", dt.Rows[0]["FCWTG"].ToString(), "YSNewProcess/YHProcess.aspx?YHState=" + Server.UrlEncode("复查未通过")); } //升级的先注释掉了 //int up = MainData.getNocloseUpYH(DepID); //if (up > 0) //{ // bl = true; // text += string.Format("<li><span><a href={1}>{0}条</a></span>当前,未闭合升级隐患信息:</li>", up.ToString(), "YSNewProcess/YHProcess.aspx"); //} } #endregion #region 走动计划信息待办 //获取当前走动计划 --没找到走动干部的权限在哪 先注释掉 //if (UserHandle.ValidationHandle(PermissionTag.Move))//拥有走动权限--走动干部 //{ //int countZD = MainData.getPLinfoD(PerID); var move = from a in dc.Moveplan where (a.Starttime.Value <= DateTime.Today && DateTime.Today <= a.Endtime.Value) && a.Movestate == "未走动" && a.Personid == PerID select new { a.Placeid }; if (move.Count() > 0) { bl = true; text += string.Format("<li><span><a href={1}>{0}条</a></span>您当前的走动任务有:</li>", move.Count(), "MovePlan/SearchMovePlan.aspx?do=1"); } #endregion #region 违信息待办 //获取当前待处理三违 UserHandle.InitModule("ThreeViolate_SWTreatment"); if (UserHandle.ValidationHandle(PermissionTag.SW_xxcl)) { string[] countSW = MainData.getSWinfoD(); if (countSW[0] != "0") { bl = true; text += string.Format("<li><span><a href={1}>{0}条</a></span>当前您有需要处理的三违信息有:</li>", countSW[0], "ThreeViolate/SWTreatment.aspx?SWIDgroup=" + countSW[1]); } int yj = MainData.getYujingSW(SessionBox.GetUserSession().DeptNumber); if (yj > 0) { bl = true; text += string.Format("<li><span><a href={1}>{0}人</a></span>本年度,三违预警人员数量:</li>", yj.ToString(), "YSNewSearch/SWwarning.aspx"); } } #endregion text += "</ul>"; text += "</ul>"; if (!bl) { text = "您当前无待处理信息!"; } Portlet2.Html = text; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { SF_Role r = Rolebll.GetRoleModel(decimal.Parse(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0])); rolelevel = (int)r.LevelID; Session["rolelevel"] = r.LevelID; maindeptid = SessionBox.GetUserSession().DeptNumber; switch ((int)rolelevel) { case 0: BindGridView(0, "PERSON", _pageSize, "", "", ""); AspNetPager1.RecordCount = p.PersonCount(); BindDll(ddlDept, "ID", @"24\d\d0{5}", "NAME", "ID"); break; case 1: BindGridView(0, "PERSON", _pageSize, "", "", ""); AspNetPager1.RecordCount = p.PersonCount(); BindDll(ddlDept, "ID", @"24\d\d0{5}", "NAME", "ID"); break; case 2: BindGridView(0, "PERSON", _pageSize, string.Format("maindeptid='{0}'", SessionBox.GetUserSession().DeptNumber), "", ""); AspNetPager1.RecordCount = p.PersonCount(); BindDll(ddlDept, "ID", @"24\d\d0{5}", "NAME", "ID"); ddlDept.SelectedValue = SessionBox.GetUserSession().DeptNumber; BindDll(ddlKQ, "ID", ddlDept.SelectedItem.Value.Remove(4), "NAME", "ID"); ddlKQ.Items.Insert(0, new ListItem("--全部--", "-1")); ddlDept.Enabled = false; break; default: BindGridView(0, "PERSON", _pageSize, string.Format("maindeptid='{0}'", SessionBox.GetUserSession().DeptNumber), "", ""); AspNetPager1.RecordCount = p.PersonCount(); BindDll(ddlDept, "ID", @"24\d\d0{5}", "NAME", "ID"); ddlDept.SelectedValue = SessionBox.GetUserSession().DeptNumber; BindDll(ddlKQ, "ID", ddlDept.SelectedItem.Value.Remove(4), "NAME", "ID"); ddlKQ.Items.Insert(0, new ListItem("--全部--", "-1")); ddlDept.Enabled = false; break; } //初始化模块权限 UserHandle.InitModule(this.PageTag); //是否有浏览权限 if (UserHandle.ValidationHandle(PermissionTag.Browse)) { GridViewCommandColumn colEdit = (GridViewCommandColumn)gvPerson.Columns["操作"]; if (!UserHandle.ValidationHandle(PermissionTag.Edit)) { colEdit.EditButton.Visible = false; } } } } //adsPosition.Where = "Maindeptid == \"" + SessionBox.GetUserSession().DeptNumber + "\""; //adsDept.Where = "Deptnumber.StartsWith(\"" + SessionBox.GetUserSession().DeptNumber.Remove(4) + "\")"; }