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 void Page_Load(object sender, EventArgs e) { string str; SiteRoles roles; bool flag; this.nUserId = FunUtil.GetCurrentUserID(this.Page); this.nId = Util.GetInt(base.Request, "id", -1); this.nSelId = Util.GetInt(base.Request, "sel", -1); SkinUtil.AdhereEntryStyleSheet(this.Page, "bootstrap.min.css"); if ((base.IsPostBack == 0) != null) { goto Label_0063; } goto Label_0174; Label_0063: this.btnCancel.Visible = 0; if (((this.nId > 0) == 0) != null) { goto Label_010A; } str = Util.GetString(base.Request, "act", ""); if ((("del" == str) == 0) != null) { goto Label_00C3; } SiteRoles.Del(this.nId); this.nId = -1; goto Label_0109; Label_00C3: if ((("mdy" == str) == 0) != null) { goto Label_0109; } roles = SiteRoles.Get(this.nId); PageUtil.CommonFillEdit(this, roles); this.btnAdd.Value = "更新"; this.btnCancel.Visible = 1; Label_0109 :; Label_010A : this.PaginationBar1.RecordCount = 0x2710; this.PaginationBar1.PageIndex = Util.GetInt(base.Request, "pi", 0) + 1; this.PaginationBar1.PageSize = Util.GetInt(base.Request, "ps", this.PaginationBar1.DefaultPageSize); PageUtil.RestoreSearchConditionFromSession(this.Page); this.__BindData(); Label_0174: return; }