protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { adsPersonType.Where = "Deptnumber ==\"" + SessionBox.GetUserSession().DeptNumber + "\""; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { //弹出公告 winNotice.Hide(); Ext.DoScript("showMessage();"); GetNoticeInfo(); if (!Ext.IsAjaxRequest) { AutoDoSth(); //AutoUpdate(); lblLoginName.Text = SessionBox.GetUserSession().Name; //== "ghtntech" ? "国华天能管理员" : (from p in dc.Person where p.PersonNumber == SessionBox.GetUserSession().PersonNumber select p.Name).Single(); lblRoleName.Text = "所属单位:"; lblRole.Text = SessionBox.GetUserSession().DeptName; List <string> Role = SessionBox.GetUserSession().Role; if (Role.Count != 0) { lblR.Text = "您的身份:"; for (int i = 0; i < Role.Count; i++) { cboRoleName.Items.Add(new Coolite.Ext.Web.ListItem(Role[i].ToString().Split(',')[1], Role[i].ToString().Split(',')[0])); } //cboRoleName.SelectedIndex = 0; cboRoleName.SelectedItem.Value = Role[0].ToString().Split(',')[0]; //cboRoleName.SelectedItem.Text = Role[0].ToString().Split(',')[1]; if (Role.Count > 1) { cboRoleName.Disabled = false; } else { cboRoleName.Disabled = true; } } else { lblR.Text = "程序维护员"; } InitMain(); lblServerIP.Text = System.Web.HttpContext.Current.Request.ServerVariables["Local_Addr"]; } } } }
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 dept in dc.Department select new { Deptname = dept.Deptname, Fatherid = dept.Fatherid, Deptnumber = dept.Deptnumber }; DepTreeList.DataSource = data; DepTreeList.DataBind(); } else if (lstRole.Contains(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0])) { var data = from dept in dc.Department select new { Deptname = dept.Deptname, Fatherid = dept.Fatherid, Deptnumber = dept.Deptnumber }; DepTreeList.DataSource = data; DepTreeList.DataBind(); } else { var data = from dept in dc.Department where dept.Deptnumber.StartsWith(SessionBox.GetUserSession().DeptNumber.Remove(4)) select new { Deptname = dept.Deptname, Fatherid = dept.Fatherid, Deptnumber = dept.Deptnumber }; DepTreeList.DataSource = data; DepTreeList.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { InitData(string.Format("maindept='{0}'", SessionBox.GetUserSession().DeptNumber)); //gvYHSmsSet.GroupBy(gvYHSmsSet.Columns["INFONAME"]); //gvYHSmsSet.ExpandAll(); } }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { adsSWFineSet.Where = "Deptnumber ==\"" + SessionBox.GetUserSession().DeptNumber + "\""; adsPersonType.Where = "Deptnumber ==\"" + SessionBox.GetUserSession().DeptNumber + "\""; } //adsPosition.Where = "Maindeptid == \"" + SessionBox.GetUserSession().DeptNumber + "\""; //adsDept.Where = "Deptnumber.StartsWith(\"" + SessionBox.GetUserSession().DeptNumber.Remove(4) + "\")"; }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Admin/Default.aspx"); } else { if (Request.QueryString["uid"] != null) { GetUser(int.Parse(Request.QueryString["uid"].ToString())); } } }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Admin/Login.aspx"); } else { if (!IsPostBack) { BindGroup(); BindOrder(); } } }
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"); } else { dateBegin.Date = DateTime.Parse(System.DateTime.Now.Year + "-" + System.DateTime.Now.Month + "-01"); dateEnd.Date = System.DateTime.Today; InitData(); } } }
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/Default.aspx"); } else { Response.Cache.SetCacheability(HttpCacheability.NoCache); if (Request.QueryString["icke"] != null) { HttpCookie style = new HttpCookie("UIStyle", Request.QueryString["icke"].ToString()); style.Expires = DateTime.Now.AddMonths(1); Response.Cookies.Add(style); } } }
protected void Page_Load(object sender, EventArgs e) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Admin/Login.aspx"); } else { if (!IsPostBack) { btn_save.Attributes.Add("onclick", "return checksubmit()"); #region 语言加入 btn_save.Text = ResourceManager.GetString("ChangePassword_Btn_1"); #endregion } } }
protected void Page_Load(object sender, EventArgs e) { if (!Ext.IsAjaxRequest) { if (!SessionBox.CheckUserSession()) { Response.Redirect("~/Login.aspx"); } else { //this.ScriptManager1.RegisterClientScriptBlock("part", string.Format("var part=\"{0}\";", text)); //this.ScriptManager1.RegisterClientScriptBlock("text", string.Format("var text=\"{0}\";", yhText)); //Portlet2.Html = "={part}"; //Portlet1.Html = "={text}"; Ext.DoScript("Coolite.AjaxMethods.SetDBSY();"); Ext.DoScript("Coolite.AjaxMethods.SetNewYH();"); } } }
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 { adsSWPointSet.Where = "Deptnumber ==\"" + SessionBox.GetUserSession().DeptNumber + "\""; if (!this.IsPostBack) { DBSCMDataContext db = new DBSCMDataContext(); var warn = db.Swwarningset.Where(p => p.Deptnumber == SessionBox.GetUserSession().DeptNumber); if (warn.Count() > 0) { txtScore.Text = warn.First().Maxscore.ToString(); txtCount.Text = warn.First().Maxcount.ToString(); } } } }
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) { bind(); 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; } if (!UserHandle.ValidationHandle(PermissionTag.Move)) { colEdit.CustomButtons["sy"].Visibility = GridViewCustomButtonVisibility.Invisible; colEdit.CustomButtons["xy"].Visibility = GridViewCustomButtonVisibility.Invisible; } } } } }
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 (!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; if (rolelevel > 1) { 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)"; Session["maindeptid"] = SessionBox.GetUserSession().DeptNumber; Session["deptid"] = SessionBox.GetUserSession().DeptNumber.Remove(4); } 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)) //是否有浏览权限 { txtSender.Text = "调度所"; GetPersonList(); } else { Session["ErrorNum"] = "0"; Response.Redirect("~/Error.aspx"); } } } }
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") { } else if (lstRole.Contains(SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0])) { } else { adsPosition.Where = "Maindeptid == \"" + SessionBox.GetUserSession().DeptNumber + "\""; adsPFSWSet.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_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"); } } }
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 (!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) { 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 (!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) + "\")"; }