private unsafe void __BindRole(ListControl __drp) { SiteRoles[] rolesArray; SiteRoles roles; SiteRoles[] rolesArray2; int num; bool flag; __drp.Items.Clear(); rolesArray = SiteRoles.List(SitePortal.GetCurrentPortalId()); __drp.Items.Add(new ListItem("--请选择--", "")); rolesArray2 = rolesArray; num = 0; goto Label_0066; Label_003A: roles = rolesArray2[num]; __drp.Items.Add(new ListItem(roles.RoleName, &roles.Id.ToString())); num += 1; Label_0066: if ((num < ((int)rolesArray2.Length)) != null) { goto Label_003A; } return; }
private void __BindData() { SiteRoles[] rolesArray; ArrayList list; rolesArray = SiteRoles.List(SitePortal.GetCurrentPortalId()); list = PageUtil.GetPagedResult(rolesArray, this.PaginationBar1.PageIndex - 1, this.PaginationBar1.PageSize); this.rpt.DataSource = list; this.rpt.DataBind(); this.PaginationBar1.RecordCount = (int)rolesArray.Length; this.PaginationBar1.Visible = (((int)rolesArray.Length) < this.PaginationBar1.PageSize) == 0; return; }
protected unsafe void btnAdd_Click(object sender, EventArgs e) { SiteRoles roles; SiteRoles roles2; int num; string str; string[] strArray; bool flag; int num2; if (PageUtil.CheckValid(this, new string[] { "txt_RoleName#请输入角色名称" }) != null) { goto Label_0025; } goto Label_0134; Label_0025: if ((string.IsNullOrEmpty(this.txt_OrderId.Value) == 0) != null) { goto Label_005D; } this.txt_OrderId.Value = &SiteRoles.GetNextOrderID(SitePortal.GetCurrentPortalId()).ToString(); Label_005D: roles = SiteRoles.GetByName(SitePortal.GetCurrentPortalId(), this.txt_RoleName.Value); if (((roles == null) ? 1 : (roles.Id == this.nId)) != null) { goto Label_00B0; } PageUtil.WriteAlertAndFocus(this.Page, "该名称已存在,请检查!", this.txt_RoleName.ClientID); goto Label_0134; Label_00B0: roles2 = SiteRoles.Get(this.nId); if (((roles2 == null) == 0) != null) { goto Label_00CF; } roles2 = new SiteRoles(); Label_00CF: roles2.PortalId = SitePortal.GetCurrentPortalId(); roles2.DepartId = -1; roles2.IsDepartRole = 2; if (((PageUtil.CommonModify(this, roles2, roles2.Id, "", "创建失败,请与系统管理员联系!", "") > 0) == 0) != null) { goto Label_0134; } str = this.GetRefreshUrl(1, 1); PageUtil.WriteAlertAndRet(this.Page, "", str, ""); Label_0134: return; }
protected unsafe void Page_Load(object sender, EventArgs e) { string str; SitePortal[] portalArray; int num; SitePortal portal; bool flag; this.Session["global_pid"] = (int)0; this.nUserId = FunUtil.GetCurrentUserID(); SkinUtil.AdhereEntryStyleSheet(this.Page, "bootstrap.min.css"); this.applicationpath.Value = Globals.get_ApplicationPath(); str = ConfigurationManager.AppSettings["dbdefaultportal"]; if ((base.IsPostBack == 0) != null) { goto Label_0069; } goto Label_012A; Label_0069: this.lblPortalName.Text = PortalSettings.get_PortalName(); portalArray = SitePortal.GetAllPortal(); if (((portalArray == null) ? 0 : ((((int)portalArray.Length) < 2) == 0)) != null) { goto Label_00AA; } this.trPortal.Visible = 0; goto Label_012A; Label_00AA: this.trPortal.Visible = 1; this.selPortal.Items.Clear(); num = 1; goto Label_00FE; Label_00CD: portal = portalArray[num]; this.selPortal.Items.Add(new ListItem(portal.Title, &portal.id.ToString())); num += 1; Label_00FE: if ((num < ((int)portalArray.Length)) != null) { goto Label_00CD; } PageUtil.SetSel(this.selPortal, str); this.Session["global_allportal"] = portalArray; Label_012A: return; }
protected void btnSubmitP_ServerClick(object sender, EventArgs e) { string str; string str2; UserInfo info; bool flag; str = this.txt_UserName_P.Value.Trim(); str2 = this.txt_Password_P.Value.Trim(); info = UserInfo.GetUserInfoByUserName(SitePortal.GetCurrentPortalID(), str); if (((info == null) == 0) == null) { goto Label_005C; } info.Password = MD5Encrypt.PasswordEncrypt(str2); CommonClassDB.Instance(info).set(info); this.__BindData(); Label_005C: return; }
protected unsafe void Page_Load(object sender, EventArgs e) { int num; int num2; UserInfo info; int num3; int num4; SitePortal[] portalArray; int num5; int num6; SitePortal portal; bool flag; object[] objArray; num = PersistenceManager.GlobalPortalId; if (((num < 1) == 0) != null) { goto Label_0067; } base.Response.Redirect(string.Concat(new object[] { "Index.aspx?portal=", &num.ToString(), "&u", this.Session["global_username"] }), 1); goto Label_02F6; Label_0067: this.nPortalId = SitePortal.GetCurrentPortalId(); this.nUserId = FunUtil.GetCurrentUserID(); this.nSelFuncId = Util.GetInt(base.Request, "p", 0); if (((this.nSelFuncId < 1) == 0) != null) { goto Label_00AD; } this.nSelFuncId = -1; Label_00AD: PageUtil.AdhereJS(this.Page, "jquery.js"); PageUtil.AdhereJS(this.Page, "bootstrap.js"); SkinUtil.AdhereEntryStyleSheet(this.Page, "bootstrap.min.css"); SkinUtil.AdhereEntryStyleSheet(this.Page, "style.css"); this.navTier.Visible = 0; if (((PortalSettings.get_DefaultTypeSub() == 2) == 0) != null) { goto Label_0132; } this.navTier.Visible = 1; this.m_strTopPX = "105px"; this.__InirTopMenu(); Label_0132: this.__InitLeftMenu(); this.ltSiteName.Text = PortalSettings.get_PortalName(); info = UserInfo.Get(this.nUserId); if ((info == null) != null) { goto Label_019C; } if ((((info.Sex == "2") != null) ? 0 : ((info.Sex == "女") == 0)) != null) { goto Label_019B; } this.m_strUserIcon = "womanbig.png"; Label_019B :; Label_019C : this.m_strUserInfo = string.Format("欢迎你,{0}", FunUtil.GetCurrentUserName(1)); this.hdCurrentUserId.Value = &this.nUserId.ToString(); this.m_strNewMessageCount = ""; num3 = MessageItem.GetUnreadMessageCount(this.nUserId); if (((num3 > 0) == 0) != null) { goto Label_0203; } this.m_strNewMessageCount = string.Format("<span style='position:absolute;font-size:10px;background-color:#ff5029;color:#fff;border-radius:13%;right:92px;top:6px;height:12px;padding:0 3px;line-height:12px;text-align:center;cursor:pointer;' onclick='fnJumpShortMessage();'>{0}</span>", (int)num3); Label_0203: num4 = PersistenceManager.GlobalPortalId; portalArray = (SitePortal[])this.Session["global_allportal"]; if (((portalArray == null) == 0) != null) { goto Label_0275; } num5 = PersistenceManager.GlobalPortalId; Label_0237: try { this.Session["global_pid"] = "1"; portalArray = SitePortal.GetAllPortal(); goto Label_0273; } finally { Label_0258: this.Session["global_pid"] = &num5.ToString(); } Label_0273 :; Label_0275 : if ((portalArray == null) != null) { goto Label_02F6; } num6 = 1; goto Label_02E7; Label_0286: portal = portalArray[num6]; if (((portal.id == num4) == 0) != null) { goto Label_02B2; } this.m_strCurPortal = portal.Title; goto Label_02E1; Label_02B2: this.m_strOtherPortal = this.m_strOtherPortal + string.Format("<li role='presentation'><a role='menuitem' tabindex='-1' href='#' onclick='goChangePortal({0});return false;'>{1}</a></li>", (int)portal.id, portal.Title); Label_02E1: num6 += 1; Label_02E7: if ((num6 < ((int)portalArray.Length)) != null) { goto Label_0286; } Label_02F6: return; }
protected unsafe void Page_Load(object sender, EventArgs e) { string str; StringBuilder builder; ListItem item; string str2; string str3; int num; Department department; string str4; Hashtable hashtable; Department department2; bool flag; IEnumerator enumerator; IDisposable disposable; this.nUserId = FunUtil.GetCurrentUserID(this.Page); this.m_nParentId = Util.GetInt(base.Request, "parentid", -1); str = Util.GetString(base.Request, "act", ""); if (string.IsNullOrEmpty(str) != null) { goto Label_03FE; } if ((("queryparent" == str) == 0) != null) { goto Label_016A; } this.sel_ParentId.Items.Clear(); Department.BindPages(this.sel_ParentId, -1); builder = new StringBuilder(); enumerator = this.sel_ParentId.Items.GetEnumerator(); Label_009E: try { goto Label_0128; Label_00A3: item = (ListItem)enumerator.Current; str2 = item.Text; if ((((item.Value == "-1") != null) ? 0 : ((item.Value == "0") == 0)) != null) { goto Label_00ED; } str2 = "无"; Label_00ED: str3 = string.Format("{0}\t{1}", str2, item.Value); if (((builder.Length > 0) == 0) != null) { goto Label_011E; } builder.Append("\n"); Label_011E: builder.Append(str3); Label_0128: if (enumerator.MoveNext() != null) { goto Label_00A3; } goto Label_0157; } finally { Label_013A: disposable = enumerator as IDisposable; if ((disposable == null) != null) { goto Label_0156; } disposable.Dispose(); Label_0156 :; } Label_0157 : this.__Return(builder.ToString()); goto Label_0476; Label_016A: if ((("query" == str) == 0) != null) { goto Label_0206; } num = Util.GetInt(base.Request, "funcid", -1); if (((num < 1) == 0) != null) { goto Label_01A6; } num = -1; Label_01A6: department = Department.Get(num); if ((department == null) != null) { goto Label_01F2; } str3 = string.Format("OK\t{0}\t{1}\t{2}", department.Name, (int)department.ParentId, (int)department.OrderId); this.__Return(str3); goto Label_0200; Label_01F2: this.__Return(""); Label_0200: goto Label_03FD; Label_0206: if ((("add" == str) == 0) != null) { goto Label_03A1; } num = Util.GetInt(base.Request, "funcid", -1); if (((num < 1) == 0) != null) { goto Label_0242; } num = -1; Label_0242: hashtable = PageUtil.GetHashFromUrl(Util.GetString(base.Request, "parameter", "")); department = Department.Get(num); if (((department == null) == 0) != null) { goto Label_0280; } department = new Department(); Label_0280: department.Name = hashtable["Name"]; department.ParentId = Util.pasteInt(hashtable["ParentId"], -1); department.OrderId = Util.pasteInt(hashtable["OrderId"], 0); if ((string.IsNullOrEmpty(department.Name) == 0) != null) { goto Label_02F5; } this.__Return("名称不能为空,请修改!"); Label_02F5: if (((department.OrderId == 0) == 0) != null) { goto Label_0319; } department.OrderId = Department.GetNextOrderID(SitePortal.GetCurrentPortalID()); Label_0319: department.PortalId = SitePortal.GetCurrentPortalID(); department.IsDelete = 2; department2 = Department.GetByName(SitePortal.GetCurrentPortalID(), department.ParentId, department.Name); if (((department2 == null) ? 1 : (department2.Id == department.Id)) != null) { goto Label_037F; } this.__Return(string.Format("名称“{0}”已存在,请修改!", department.Name)); goto Label_039C; Label_037F: CommonClassDB.Instance(department).set(department); this.__Return("OK"); Label_039C: goto Label_0476; Label_03A1: if ((("del" == str) == 0) != null) { goto Label_03FD; } num = Util.GetInt(base.Request, "funcid", -1); if (((num < 1) == 0) != null) { goto Label_03E5; } this.__Return("请选择需要删除记录!"); goto Label_03FB; Label_03E5: Department.Del(num); this.__Return("OK"); Label_03FB: goto Label_0476; Label_03FD :; Label_03FE : SkinUtil.AdhereEntryStyleSheet(this.Page, "bootstrap.min.css"); if ((base.IsPostBack == 0) == null) { goto Label_0476; } flag = 0; department = new Department(); PageUtil.InitTree(this.Page, this.treeChannel, 0, department); PageUtil.SetTreeSel(this.treeChannel, "func" + &this.m_nParentId.ToString()); this.returl.Value = this.GetRefreshUrl(0, 0); Label_0476: return; }
protected unsafe void Page_Load(object sender, EventArgs e) { string str; string str2; bool flag; string str3; string str4; int num; int num2; int num3; int num4; string str5; string str6; string str7; string str8; string str9; UserInfo info; string str10; UserInfo info2; int num5; UserRoles[] rolesArray; UserRoles roles; int num6; string str11; string str12; string str13; HB_ShiCZTItem item; HB_ShiCZTItem item2; bool flag2; int num7; string str14; string str15; string str16; Exception exception; bool flag3; int num8; bool flag4; DateTime time; UserRoles[] rolesArray2; int num9; str = ""; Label_0007: try { str2 = Util.GetString(base.Request, "act", ""); flag = 0; if (flag != null) { goto Label_06E8; } flag = 1; if ((("login" == str2) == 0) != null) { goto Label_0206; } if (((this.Session["global_allportal"] == null) == 0) != null) { goto Label_0079; } this.Session["global_allportal"] = SitePortal.GetAllPortal(); Label_0079: str3 = Util.GetString(base.Request, "txtUserName", ""); str4 = Util.GetString(base.Request, "txtPassword", ""); num = Util.GetInt(base.Request, "selPortal", 1); if ((string.IsNullOrEmpty(str3) == 0) != null) { goto Label_00D3; } str = "请输入用户名!"; goto Label_0200; Label_00D3: if ((string.IsNullOrEmpty(str4) == 0) != null) { goto Label_00EF; } str = "请输入用户密码!\ttxtUserName"; goto Label_01FF; Label_00EF: if (((num < 1) == 0) != null) { goto Label_0109; } str = "请选择登陆角色!\tselPortal"; goto Label_01FE; Label_0109: this.Session["global_pid"] = &num.ToString(); num2 = FunUtil.Login(this.Page, SitePortal.GetCurrentPortalId(), str3, str4); if (((num2 == 0) == 0) != null) { goto Label_01A4; } this.Session["global_pid"] = &num.ToString(); this.Session["global_pid2"] = &num.ToString(); this.Session["global_username"] = str3; this.Session["global_password"] = str4; str = "ok"; goto Label_01FD; Label_01A4: num8 = num2; switch ((num8 - 1)) { case 0: goto Label_01CC; case 1: goto Label_01D4; case 2: goto Label_01DC; case 3: goto Label_01E4; case 4: goto Label_01EC; case 5: goto Label_01F4; } goto Label_01FC; Label_01CC: str = "帐号不存在\ttxtUserName"; goto Label_01FC; Label_01D4: str = "密码错误\ttxtPassword"; goto Label_01FC; Label_01DC: str = "输入有误\ttxtUserName"; goto Label_01FC; Label_01E4: str = "本帐号已失效,不能登录!\ttxtUserName"; goto Label_01FC; Label_01EC: str = "当前IP不能登录本帐号\ttxtUserName"; goto Label_01FC; Label_01F4: str = "本站点当前不允许帐号登录!\ttxtUserName"; Label_01FC :; Label_01FD :; Label_01FE :; Label_01FF :; Label_0200: goto Label_06E7; Label_0206: if ((("logout" == str2) == 0) != null) { goto Label_026E; } flag4 = 0; PageUtil.SetCookie(this.Page, "GWZKJLMM", &flag4.ToString(), 360); PageUtil.SetCookie(this.Page, "GWZKUserInfo", "", 360); FunUtil.Logout(this.Page); str = "ok"; goto Label_06E7; Label_026E: if ((("changeportal" == str2) == 0) != null) { goto Label_03A5; } num = Util.GetInt(base.Request, "pid", PersistenceManager.GlobalPortalId); str3 = this.Session["global_username"]; str4 = this.Session["global_password"]; num3 = PersistenceManager.GlobalPortalId; this.Session["global_pid"] = &num.ToString(); num2 = FunUtil.Login(this.Page, SitePortal.GetCurrentPortalId(), str3, str4); if (((num2 == 0) == 0) != null) { goto Label_032E; } this.Session["global_pid"] = &num.ToString(); str = "ok"; goto Label_039F; Label_032E: this.Session["global_pid"] = &num3.ToString(); num8 = num2; switch ((num8 - 1)) { case 0: goto Label_036E; case 1: goto Label_0376; case 2: goto Label_037E; case 3: goto Label_0386; case 4: goto Label_038E; case 5: goto Label_0396; } goto Label_039E; Label_036E: str = "帐号不存在"; goto Label_039E; Label_0376: str = "密码错误"; goto Label_039E; Label_037E: str = "输入有误"; goto Label_039E; Label_0386: str = "本帐号已失效,不能登录!"; goto Label_039E; Label_038E: str = "当前IP不能登录本帐号"; goto Label_039E; Label_0396: str = "本站点当前不允许帐号登录!"; Label_039E :; Label_039F : goto Label_06E7; Label_03A5: if ((("register" == str2) == 0) != null) { goto Label_06E5; } num = Util.GetInt(base.Request, "selPortal", 1); if ((num == 3) != null) { goto Label_03F3; } str = string.Format("当前仅开放了电厂端系统的用户注册,请返回首页,选择合适的“登陆角色”!", new object[0]); goto Label_06E2; Label_03F3: this.Session["global_pid"] = &num.ToString(); num4 = SitePortal.GetCurrentPortalId(); str3 = Util.GetString(base.Request, "txt_UserName", ""); str5 = Util.GetString(base.Request, "txt_Mobile", ""); str4 = Util.GetString(base.Request, "txt_PasswordCustom", ""); str6 = Util.GetString(base.Request, "txt_PasswordCustom2", ""); str7 = Util.GetString(base.Request, "txtYZM", ""); str8 = Util.GetString(base.Request, "txt_UserType", ""); if ((string.IsNullOrEmpty(str3) == 0) != null) { goto Label_04C0; } str = string.Format("请输入用户名!\ttxt_UserName", new object[0]); goto Label_052F; Label_04C0: str9 = this.Session["SJCode"]; if ((string.IsNullOrEmpty(str9) == 0) != null) { goto Label_04FD; } str = string.Format("验证码已改变,请点“刷新”按钮!\ttxtYZM", new object[0]); goto Label_052E; Label_04FD: if (((str7.ToLower() != str9.ToLower()) == 0) != null) { goto Label_052D; } str = string.Format("验证码不正确,请改正!\ttxtYZM", new object[0]); Label_052D :; Label_052E :; Label_052F: if ((string.IsNullOrEmpty(str) == 0) != null) { goto Label_0563; } if ((UserInfo.GetUserInfoByUserName(num4, str3) == null) != null) { goto Label_0562; } str = string.Format("用户名“{0}”已存在,请改正!\ttxt_UserName", str3); Label_0562 :; Label_0563 : if ((string.IsNullOrEmpty(str) == 0) != null) { goto Label_05B7; } if ((str5.Length == 11) != null) { goto Label_0595; } str = string.Format("手机号“{0}”不正确,请改正!\ttxt_Mobile", str5); goto Label_05B6; Label_0595: if (((str4 != str6) == 0) != null) { goto Label_05B6; } str = string.Format("两次输入的密码不匹配,请改正!\ttxt_PasswordCustom", str5); Label_05B6 :; Label_05B7 : if ((string.IsNullOrEmpty(str) == 0) != null) { goto Label_06E1; } CommonClassDB.ClearAllCache(); str10 = MD5Encrypt.PasswordEncrypt(str4); info2 = new UserInfo(); info2.PortalId = num4; info2.IsDelete = 2; info2.IsActive = 1; info2.IsSystemUser = 1; info2.Status = 1; info2.CreateTime = &DateTime.Now.Ticks; info2.UserName = str3; info2.RealName = str3; info2.Mobile = str5; info2.Password = str10; num5 = CommonClassDB.Instance(info2).set(info2); if (((num5 < 1) == 0) != null) { goto Label_0673; } str = string.Format("创建失败,请与管理员联系!", new object[0]); goto Label_06E0; Label_0673: rolesArray = UserRoles.GetUserRolesByUser(num5); if ((rolesArray == null) != null) { goto Label_06BC; } rolesArray2 = rolesArray; num9 = 0; goto Label_06AD; Label_0693: roles = rolesArray2[num9]; UserRoles.Del(roles.get_id()); num9 += 1; Label_06AD: if ((num9 < ((int)rolesArray2.Length)) != null) { goto Label_0693; } Label_06BC: UserRoles.SetUserRole("注册用户", -1, 0, num5); FunUtil.AutoLloginUser(this.Page, info2); str = "ok"; Label_06E0 :; Label_06E1 :; Label_06E2: goto Label_06E7; Label_06E5: flag = 0; Label_06E7 :; Label_06E8 : if (flag != null) { goto Label_0CB6; } flag = 1; if ((("sumbit_ZhuTXX" == str2) == 0) != null) { goto Label_095C; } num6 = FunUtil.GetCurrentUserID(); if (((num6 < 1) == 0) != null) { goto Label_0735; } str = string.Format("请重新登陆系统!\ttxt_Code", new object[0]); Label_0735: num4 = SitePortal.GetCurrentPortalId(); str11 = Util.GetString(base.Request, "txt_Code", ""); str12 = Util.GetString(base.Request, "hidden_YingYZZ", ""); str13 = Util.GetString(base.Request, "hidden_DianLYWXKZ", ""); if ((((string.IsNullOrEmpty(str11) != null) || (string.IsNullOrEmpty(str12) != null)) ? 0 : (string.IsNullOrEmpty(str13) == 0)) != null) { goto Label_07BA; } str = string.Format("输入不正确,请改正!\ttxt_Code", new object[0]); Label_07BA: item = HB_ShiCZTItem.GetByUserId(num6); if (((item == null) == 0) != null) { goto Label_080B; } item = new HB_ShiCZTItem(); item.UserId = num6; item.Creator = num6; item.CreateTime = &DateTime.Now.Ticks; item.IsDelete = 2; goto Label_082B; Label_080B: item.Modifier = num6; item.ModifyTime = &DateTime.Now.Ticks; Label_082B: if ((string.IsNullOrEmpty(str) == 0) != null) { goto Label_0872; } item2 = HB_ShiCZTItem.GetByName(str11); if (((item2 == null) ? 1 : (item2.Id == item.Id)) != null) { goto Label_0871; } str = string.Format("组织机构名称“{0}”已存在,请改正!\ttxt_Code", str11); Label_0871 :; Label_0872 : if ((string.IsNullOrEmpty(str) == 0) != null) { goto Label_0956; } item.Name = str11; item.RecordStatus = 1; num5 = CommonClassDB.Instance(item).set(item); if (((num5 > 0) == 0) != null) { goto Label_094F; } item = HB_ShiCZTItem.Get(num5); flag2 = 0; if (((str12 != "exist") == 0) != null) { goto Label_08FB; } if ((PageUtil.UploadAttachForBootstrap(this.Page, str12, item, "YingYZZ") == 0) != null) { goto Label_08FA; } flag2 = 1; Label_08FA :; Label_08FB : if (((str13 != "exist") == 0) != null) { goto Label_0932; } if ((PageUtil.UploadAttachForBootstrap(this.Page, str13, item, "DianLYWXKZ") == 0) != null) { goto Label_0931; } flag2 = 1; Label_0931 :; Label_0932 : if ((flag2 == 0) != null) { goto Label_094E; } CommonClassDB.Instance(item).set(item); Label_094E :; Label_094F : str = "ok"; Label_0956: goto Label_0CB5; Label_095C: if ((("reject_ZhuTXX" == str2) == 0) != null) { goto Label_0AF0; } num6 = FunUtil.GetCurrentUserID(); if (((num6 < 1) == 0) != null) { goto Label_099C; } str = string.Format("请重新登陆系统!", new object[0]); Label_099C: if (FunUtil.CanExecEntityAction(num6, "SJ.DesktopModules.HB.主体信息审核自动实体", "DianChang_ShiCZT_ZhuTAudit") != null) { goto Label_09C1; } str = string.Format("当前用户没有执行该功能权限({0})!", str2); Label_09C1: num7 = Util.GetInt(base.Request, "id", -1); str14 = Util.GetString(base.Request, "txt_Reason", ""); if ((string.IsNullOrEmpty(str) == 0) != null) { goto Label_0A1D; } if (((num7 < 1) == 0) != null) { goto Label_0A1C; } str = string.Format("参数错误!", new object[0]); Label_0A1C :; Label_0A1D : item = HB_ShiCZTItem.Get(num7); if ((string.IsNullOrEmpty(str) == 0) != null) { goto Label_0A58; } if (((item == null) == 0) != null) { goto Label_0A57; } str = string.Format("参数错误!", new object[0]); Label_0A57 :; Label_0A58 : if ((string.IsNullOrEmpty(str) == 0) != null) { goto Label_0AEA; } item.Modifier = num6; item.ModifyTime = &DateTime.Now.Ticks; item.RecordStatus = 0x1f; item.Reason = str14; if (((CommonClassDB.Instance(item).set(item) > 0) == 0) != null) { goto Label_0AE3; } UserRoles.RemoveUserFromRoleName("发电企业", -1, 0, item.UserId); UserRoles.SetUserRole("注册用户", -1, 0, item.UserId); Label_0AE3: str = "ok"; Label_0AEA: goto Label_0CB5; Label_0AF0: if ((("audit_ZhuTXX" == str2) == 0) != null) { goto Label_0CB3; } num6 = FunUtil.GetCurrentUserID(); if (((num6 < 1) == 0) != null) { goto Label_0B30; } str = string.Format("请重新登陆系统!", new object[0]); Label_0B30: if (FunUtil.CanExecEntityAction(num6, "SJ.DesktopModules.HB.主体信息审核自动实体", "DianChang_ShiCZT_ZhuTAudit") != null) { goto Label_0B55; } str = string.Format("当前用户没有执行该功能权限({0})!", str2); Label_0B55: num7 = Util.GetInt(base.Request, "id", -1); str15 = Util.GetString(base.Request, "txt_DiaoDGX_New", ""); str16 = Util.GetString(base.Request, "txt_EnterDate_New", ""); if ((string.IsNullOrEmpty(str) == 0) != null) { goto Label_0BC8; } if (((num7 < 1) == 0) != null) { goto Label_0BC7; } str = string.Format("参数错误!", new object[0]); Label_0BC7 :; Label_0BC8 : item = HB_ShiCZTItem.Get(num7); if ((string.IsNullOrEmpty(str) == 0) != null) { goto Label_0C03; } if (((item == null) == 0) != null) { goto Label_0C02; } str = string.Format("参数错误!", new object[0]); Label_0C02 :; Label_0C03 : if ((string.IsNullOrEmpty(str) == 0) != null) { goto Label_0CB0; } item.Modifier = num6; item.ModifyTime = &DateTime.Now.Ticks; item.RecordStatus = 3; item.DiaoDGX = str15; item.EnterDate = &Util.ParseDate(str16, DateTime.Now).Ticks; if (((CommonClassDB.Instance(item).set(item) > 0) == 0) != null) { goto Label_0CA9; } UserRoles.RemoveUserFromRoleName("注册用户", -1, 0, item.UserId); UserRoles.SetUserRole("发电企业", -1, 0, item.UserId); Label_0CA9: str = "ok"; Label_0CB0: goto Label_0CB5; Label_0CB3: flag = 0; Label_0CB5 :; Label_0CB6 : if (flag != null) { goto Label_0CCB; } str = string.Format("未知的操作:{0},请与系统管理员联系!", str2); Label_0CCB: goto Label_0CDC; } catch (Exception exception1) { Label_0CCE: exception = exception1; str = exception.Message; goto Label_0CDC; } Label_0CDC: this.__Return(str); return; }
protected unsafe void btnAdd_Click(object sender, EventArgs e) { UserInfo info; UserInfo info2; int num; int num2; UserRoles[] rolesArray; UserRoles roles; UserRoles roles2; string str; string[] strArray; bool flag; int num3; UserRoles[] rolesArray2; int num4; if (PageUtil.CheckValid(this, new string[] { "txt_UserName#请输入用户名" }) != null) { goto Label_0025; } goto Label_01CF; Label_0025: if ((string.IsNullOrEmpty(this.txt_OrderId.Value) == 0) != null) { goto Label_005D; } this.txt_OrderId.Value = &UserInfo.GetNextId(SitePortal.GetCurrentPortalId()).ToString(); Label_005D: info = UserInfo.GetUserInfoByUserName(SitePortal.GetCurrentPortalId(), this.txt_UserName.Value); if (((info == null) ? 1 : (info.Id == this.nId)) != null) { goto Label_00B0; } PageUtil.WriteAlertAndFocus(this.Page, "该用户名已存在,请检查!", this.txt_UserName.ClientID); goto Label_01CF; Label_00B0: info2 = UserInfo.Get(this.nId); if (((info2 == null) == 0) != null) { goto Label_00CF; } info2 = new UserInfo(); Label_00CF: info2.PortalId = SitePortal.GetCurrentPortalId(); info2.IsActive = 1; info2.IsSystemUser = 1; info2.Status = 1; info2.IsDelete = 2; num = PageUtil.CommonModify(this, info2, info2.Id, "", "创建失败,请与系统管理员联系!", ""); if (((num > 0) == 0) != null) { goto Label_01CF; } num2 = Util.pasteInt(this.sel_Role.SelectedValue, -1); rolesArray = UserRoles.GetUserRolesByUser(num); rolesArray2 = rolesArray; num4 = 0; goto Label_0164; Label_0148: roles = rolesArray2[num4]; UserRoles.Del(roles.get_id()); num4 += 1; Label_0164: if ((num4 < ((int)rolesArray2.Length)) != null) { goto Label_0148; } roles2 = new UserRoles(); roles2.RoleID = num2; roles2.UserID = num; roles2.DepartmentID = -1; CommonClassDB.Instance(roles2).set(roles2); UserInfo.ClearAllUsersHash(); UserInfo.CleanOnlineUsers(); str = this.GetRefreshUrl(1, 1); PageUtil.WriteAlertAndRet(this.Page, "", str, ""); Label_01CF: return; }
protected unsafe void btnSubmit_ServerClick(object sender, EventArgs e) { int num; string str; string str2; string str3; string str4; UserInfo info; string str5; int num2; UserRoles[] rolesArray; UserRoles roles; string str6; bool flag; string[] strArray; DateTime time; UserRoles[] rolesArray2; int num3; num = SitePortal.GetCurrentPortalId(); this.m_strPassword = this.txt_PasswordCustom.Value.Trim(); this.m_strPassword2 = this.txt_PasswordCustom2.Value.Trim(); if (((this.m_strPassword != this.m_strPassword2) == 0) != null) { goto Label_006F; } PageUtil.WriteAlertAndFocus(this.Page, "两次输入密码必须一致,请修改!", this.txt_PasswordCustom2.ClientID); goto Label_02D9; Label_006F :; if (PageUtil.CheckValid(this, new string[] { "txt_UserName#请输入登录用户名", "txt_Mobile#请输入手机号", "txtYZM#请输入验证码" }) != null) { goto Label_00A5; } goto Label_02D9; Label_00A5: str = this.txtYZM.Value.Trim(); str2 = PageUtil.VerifySmartJoinCode(this.Page, str); if ((("ok" != str2) == 0) != null) { goto Label_00F9; } PageUtil.WriteAlertAndFocus(this.Page, "验证码不正确,请修改!", this.txtYZM.ClientID); goto Label_02D9; Label_00F9: CommonClassDB.ClearAllCache(); str3 = this.txt_UserName.Value.Trim(); str4 = this.txt_Mobile.Value.Trim(); if ((UserInfo.GetUserInfoByUserName(num, str3) == null) != null) { goto Label_0158; } PageUtil.WriteAlertAndFocus(this.Page, "用户名已存在,请修改!", this.txt_UserName.ClientID); goto Label_02D9; Label_0158: if ((UserInfo.GetUserInfoByMobile(num, str4) == null) != null) { goto Label_018F; } PageUtil.WriteAlertAndFocus(this.Page, "手机号已存在,请修改!", this.txt_Mobile.ClientID); goto Label_02D9; Label_018F: str5 = MD5Encrypt.PasswordEncrypt(this.m_strPassword); info = new UserInfo(); info.PortalId = num; info.IsDelete = 2; info.IsActive = 1; info.IsSystemUser = 1; info.CreateTime = &DateTime.Now.Ticks; info.RealName = str3; info.Password = str5; num2 = PageUtil.CommonModify(this, info, info.get_id(), "", "", ""); if (((num2 < 1) == 0) != null) { goto Label_022E; } PageUtil.WriteAlert(this.Page, "创建失败,请与管理员联系!"); goto Label_02D9; Label_022E: rolesArray = UserRoles.GetUserRolesByUser(num2); if ((rolesArray == null) != null) { goto Label_0276; } rolesArray2 = rolesArray; num3 = 0; goto Label_0267; Label_024D: roles = rolesArray2[num3]; UserRoles.Del(roles.get_id()); num3 += 1; Label_0267: if ((num3 < ((int)rolesArray2.Length)) != null) { goto Label_024D; } Label_0276: UserRoles.SetUserRole("注册用户", -1, 0, num2); FunUtil.AutoLloginUser(this.Page, info); str6 = Util.GetString(base.Request, "returl", ""); if ((string.IsNullOrEmpty(str6) == 0) != null) { goto Label_02C1; } str6 = "../../../Index.aspx"; Label_02C1: PageUtil.WriteAlertAndRet(this.Page, "用户注册成功!", str6, ""); Label_02D9: return; }