Exemple #1
0
        private void InitialText()
        {
            RolePermissions.AccessCheck(OperateCode.SpecialManage);
            string str = BasePage.RequestStringToLower("Action", "add");

            if (this.Page.IsPostBack)
            {
                return;
            }
            if (str == "copy")
            {
                this.specialId = Special.GetSpecialByIdCopySpecial(this.specialId);
                if (this.specialId > 0)
                {
                    this.InputPermissions(this.specialId);
                    this.InputRolePermission(this.specialId);
                    IncludeFile.CreateIncludeFileByAssociateType(AssociateType.Special);
                    base.Response.Write("<script type='text/javascript'>parent.frames[\"left\"].location.reload();</script>");
                    AdminPage.WriteSuccessMsg("<li>专题信息保存成功!</li>", "Special.aspx?Action=Modify&SpecialID=" + this.specialId.ToString());
                }
                else
                {
                    AdminPage.WriteErrMsg("<li>发生错误!</li>", "");
                }
            }
            IList <SpecialCategoryInfo> specialCategoryList = Special.GetSpecialCategoryList();

            this.DropSpecialCategory.SelectedValue = this.specialCategoryId.ToString();
            this.DropSpecialCategory.DataSource    = specialCategoryList;
            this.DropSpecialCategory.DataBind();
            ((DropDownList)this.PnlCustomFileds.FindControl("DropCustomNum")).Attributes.Add("onchange", "setFileFileds(this.value)");
            this.InitEChklPermission();
            string str2 = str;

            if (str2 != null)
            {
                if (!(str2 == "add"))
                {
                    if (str2 == "modify")
                    {
                        this.SmpNavigator.CurrentNode = "修改专题";
                        this.EBtnModify.Visible       = true;
                        if (!this.Page.IsPostBack)
                        {
                            this.BindSpecial();
                        }
                        goto Label_023A;
                    }
                }
                else
                {
                    this.SmpNavigator.CurrentNode = "添加专题";
                    this.EBtnAdd.Visible          = true;
                    BasePage.SetSelectedIndexByValue(this.DropSpecialCategory, this.specialCategoryId.ToString());
                    if (BasePage.RequestString("AddType").CompareTo("BatchSpecial") == 0)
                    {
                        this.SpecialName.Visible       = false;
                        this.SpecialIdentifier.Visible = false;
                        this.SpecialDir.Visible        = false;
                        this.BatchSpecial.Visible      = true;
                        this.TxtSpecialNames.Attributes.Add("onchange", "GetBatchInitial();");
                    }
                    else
                    {
                        this.TxtSpecialName.Attributes.Add("onchange", "GetInitial();");
                    }
                    goto Label_023A;
                }
            }
            this.SmpNavigator.CurrentNode = "添加专题";
            this.EBtnAdd.Visible          = true;
Label_023A:
            if (!RolePermissions.AccessCheck(OperateCode.AdministratorManage))
            {
                this.TabTitle1.Style.Add("display", "none");
            }
        }