コード例 #1
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>");
     }
 }
コード例 #2
0
ファイル: BarController.cs プロジェクト: baixue001/IPS
        public ContentResult Cate_API()
        {
            string action = GetParam("action");
            string ids    = GetParam("ids");

            switch (action)
            {
            case "del":
                cateBll.DelByCateIDS(ids);
                break;

            case "recommend":
            {
                string[] idArr = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                foreach (var item in ids)
                {
                    M_GuestBookCate mc = cateBll.SelReturnModel(Convert.ToInt32(item));
                    mc.BarInfo = "Recommend";
                    cateBll.UpdateByID(mc);
                }
            }
            break;

            case "unrecommend":
            {
                string[] idArr = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                foreach (var item in ids)
                {
                    M_GuestBookCate mc = cateBll.SelReturnModel(Convert.ToInt32(item));
                    mc.BarInfo = "";
                    cateBll.UpdateByID(mc);
                }
            }
            break;

            case "clear":
            {
                //清空栏目下所有数据
                barBll.DelByCid(DataConvert.CLng(ids));
            }
            break;
            }
            return(Content(Success.ToString()));
        }