protected void BtnSetRecomPosation_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(Request.Form["idchk"]))
     {
         string[] ids = Request.Form["idchk"].Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         foreach (var item in ids)
         {
             M_GuestBookCate mc = cateBll.SelReturnModel(Convert.ToInt32(item));
             mc.BarInfo = "Recommend";
             cateBll.UpdateByID(mc);
         }
         function.WriteSuccessMsg("操作完成!");
     }
 }
Ejemplo n.º 2
0
        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()));
        }
Ejemplo n.º 3
0
 protected void SaveOrder_B_Click(object sender, EventArgs e)
 {
     string[] ids = changeids.Value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
     if (ids.Length > 0)
     {
         string[] orderIds = changeorders.Value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
         for (int i = 0; i < ids.Length; i++)
         {
             M_GuestBookCate CateMod = cateBll.SelReturnModel(Convert.ToInt32(ids[i]));
             CateMod.OrderID = Convert.ToInt32(orderIds[i]);
             cateBll.UpdateByID(CateMod);
         }
         MyBind();
     }
     function.Script(this, "Refresh();");
 }
Ejemplo n.º 4
0
        public IActionResult CateAdd_Submit(M_GuestBookCate model)
        {
            M_GuestBookCate cateMod = cateBll.SelReturnModel(Mid);

            if (cateMod == null)
            {
                cateMod = new M_GuestBookCate();
            }
            cateMod.CateName      = model.CateName;
            cateMod.Status        = model.Status;
            cateMod.IsShowUnaudit = DataConvert.CLng(GetParam("IsShowUnaudit"));
            cateMod.Desc          = model.Desc;
            if (cateMod.CateID > 0)
            {
                cateBll.UpdateByID(cateMod);
            }
            else
            {
                cateBll.Insert(cateMod);
            }
            return(JavaScript("<script>parent.mybind();</script>"));
        }