コード例 #1
0
        public ContentResult ContentManage_API()
        {
            string action = GetParam("action");
            string ids    = GetParam("ids");

            switch (action)
            {
            case "move":
                string direct = Request.Form["direct"];
                int    curid = DataConvert.CLng(Request.Form["curid"]), tarid = DataConvert.CLng(Request.Form["tarid"]);

                M_CommonData curMod = contentBll.GetCommonData(curid);
                M_CommonData tarMod = contentBll.GetCommonData(tarid);
                if (curMod.OrderID == tarMod.OrderID)
                {
                    switch (direct)
                    {
                    case "up":
                        curMod.OrderID++;
                        break;

                    case "down":
                        curMod.OrderID--;
                        break;
                    }
                }
                else
                {
                    int temp = curMod.OrderID;
                    curMod.OrderID = tarMod.OrderID;
                    tarMod.OrderID = temp;
                }
                contentBll.UpdateByID(curMod); contentBll.UpdateByID(tarMod);
                return(Content("true"));

            case "del":
                contentBll.DelContent(ids, "");
                break;

            case "recover":
                contentBll.Reset(ids);
                break;

            case "clear":
                contentBll.DelRecycle();
                break;

            default:
                break;
            }
            return(Content(Success.ToString()));
        }
コード例 #2
0
 // 清空回收站
 protected void btnClearAll_Click(object sender, EventArgs e)
 {
     contentBll.DelRecycle();
     MyBind();
 }