Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         B_ARoleAuth.CheckEx(ZLEnum.Auth.content, "AskManage");
         if (CateID <= 0)
         {
             function.WriteErrMsg("没有指定多级数据字典分类ID", "GradeCateManage.aspx");
         }
         //this.lblCateName.Text = Cate.CateName;
         M_GradeCate Cate = gradeBll.GetCate(CateID);
         this.LblCate.Text = Cate.CateName;
         //分级选项别名
         string[] GradeAlias = Cate.GradeAlias.Split(new char[] { '|' });
         //当前选项级别
         int level = 0;
         if (ParentID == 0)
         {
             level = 1;
             this.LblPreGrade.Text = "";
         }
         else
         {
             M_Grade GradeOption = B_GradeOption.GetGradeOption(ParentID);
             level = GradeOption.Grade + 1;
             this.LblPreGrade.Text = GradeOption.GradeName;
         }
         if (level <= GradeAlias.Length)
         {
             if (level == GradeAlias.Length)
             {
                 this.HdnLastLevel.Value = "1";
             }
             else
             {
                 this.HdnLastLevel.Value = "0";
             }
         }
         else
         {
             function.WriteErrMsg("当前选项已无下级选项!");
         }
         this.LblLevel.Text     = level.ToString();
         this.HdnCateID.Value   = CateID.ToString();
         this.HdnParentID.Value = ParentID.ToString();
         dBind();
         string bread = "<li><a href='DictionaryManage.aspx'>数据字典</a></li><li><a href='GradeCateManage.aspx'>多级数据字典管理</a></li>";
         if (ParentID > 0)
         {
             M_Grade parentMod = B_GradeOption.GetGradeOption(ParentID);
             bread += "<li><a href='GradeOption.aspx?CateID=" + CateID + "'>" + parentMod.GradeName + "</a></li>";
         }
         else
         {
             bread += "<li><a href='GradeCateManage.aspx'>" + Cate.CateName + "</a></li>";
         }
         bread += "<li class='active'>添加选项</li>";
         Call.SetBreadCrumb(Master, bread);
     }
 }
Exemplo n.º 2
0
        public string Encode()
        {
            String sRet = CateID.ToString() + "-" + ItemID.ToString();

            //Int32 nLimitChar = aEncode.GetUpperBound(0);
            //for (int i = 0; i <= nLimitChar; i++)
            //{
            //    sRet = sRet.Replace(aEncode[i], aDecode[i]);
            //}
            return(sRet);
        }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.HdnCateID.Value = CateID.ToString();
         if (!string.IsNullOrEmpty(Request.QueryString["type"]) && Request.QueryString["type"].Equals("del"))
         {
             barBll.DelByCid(CateID);
         }
         SKey = Request.QueryString["Skey"];
         MyBind();
         M_GuestBookCate cateMod  = cateBll.SelReturnModel(CateID);
         string          catename = cateMod == null ? "全部帖子" : cateMod.CateName;
         Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "I/Main.aspx" + "'>"
                            + "工作台</a></li><li><a href='GuestCateMana.aspx?Type=1'>贴吧版面</a></li><li class='active'><a href='TieList.aspx?CateID=" + CateID + "'>贴子列表:</a>"
                            + catename + "[<a href='TieList.aspx?" + (BarStatus != (int)ZLEnum.ConStatus.Recycle ? "&status=" + (int)ZLEnum.ConStatus.Recycle : "") + "'>" + (BarStatus != (int)ZLEnum.ConStatus.Recycle ? "回收站" : "返回") + "</a>]</li>");
     }
 }