public int Product_OP(string ids) { string action = RequestEx["a"]; if (string.IsNullOrEmpty(ids)) { return(Failed); } switch (action) { case "order": //排序本店商品 { M_Store_Info storeMod = storeBll.SelModelByUser(mu.UserID); DataTable dt = JsonConvert.DeserializeObject <DataTable>(Request.Form["list"]); foreach (DataRow dr in dt.Rows) { int id = DataConvert.CLng(dr["ID"]); int orderID = DataConvert.CLng(dr["order"]); if (orderID < 0) { orderID = 0; } DBCenter.UpdateSQL("ZL_Commodities", "ComModelID=" + orderID, "ID=" + id + " AND UserShopID=" + storeMod.ID); } } break; default: proBll.setproduct(action, ids); break; } return(Success); }
public int Product_Del(string ids) { if (!String.IsNullOrEmpty(ids)) { proBll.setproduct(13, ids); } return(Success); }
protected void Button1_Click(object sender, EventArgs e) { string CID = Request.Form["idchk"]; if (!string.IsNullOrEmpty(CID) && bll.setproduct(12, CID)) { function.WriteSuccessMsg("批量还原成功"); } DataBind(); }
//开始销售 protected void Button1_Click(object sender, EventArgs e) { string ids = Request.Form["idchk"]; if (!String.IsNullOrEmpty(ids)) { bll.setproduct(1, ids); } function.WriteSuccessMsg("操作成功"); }
public ContentResult Product_API() { string action = GetParam("action"); string ids = GetParam("ids"); switch (action) { //case "upmove": // { // M_Product product = proBll.GetproductByid(Mid); // M_Product productPre = proBll.GetNearID(NodeID, product.OrderID, 1); //int NodeID, int CurrentID, int UporDown // if (productPre.OrderID != 0) // { // int CurrOrder = product.OrderID; // product.OrderID = productPre.OrderID; // productPre.OrderID = CurrOrder; // proBll.UpdateOrder(product); // proBll.UpdateOrder(productPre); // } // } // break; //case "downmove": // { // M_Product product = proBll.GetproductByid(Mid); // M_Product productPre = proBll.GetNearID(NodeID, product.OrderID, 0); // if (productPre.ID != 0) // { // int CurrOrder = product.OrderID; // product.OrderID = productPre.OrderID; // productPre.OrderID = CurrOrder; // proBll.UpdateOrder(product); // proBll.UpdateOrder(productPre); // } // } // break; case "refresh": //刷新/重发布,将商品ctreatime和updatatime改为当前值 SafeSC.CheckIDSEx(ids); string date = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"); DBCenter.UpdateSQL(proBll.TbName, "AddTime='" + date + "',UpdateTime='" + date + "'", "ID IN (" + ids + ")"); break; case "del": SafeSC.CheckIDSEx(ids); proBll.RealDelByIDS(ids); break; case "clear": proBll.ClearRecycle(); break; default: proBll.setproduct(action, ids); break; } return(Content(Success.ToString())); }
public int Product_OP(string ids) { string action = Request["a"]; if (string.IsNullOrEmpty(ids)) { return(Failed); } switch (action) { case "addsale": proBll.setproduct(1, ids); break; case "addhot": proBll.setproduct(2, ids); break; case "addgood": proBll.setproduct(3, ids); break; case "addnew": proBll.setproduct(4, ids); break; case "removesale": proBll.setproduct(6, ids); break; case "removehot": proBll.setproduct(7, ids); break; case "removegood": proBll.setproduct(8, ids); break; case "removenew": proBll.setproduct(9, ids); break; } return(Success); }
//开始销售 protected void Button1_Click(object sender, EventArgs e) { string CID = Request.Form["idchk"]; if (!String.IsNullOrEmpty(CID) && bll.setproduct(1, CID)) { function.WriteSuccessMsg(Resources.L.批量设置为开始销售成功); } else { function.WriteSuccessMsg(Resources.L.批量设置为开始销售失败 + "!" + Resources.L.请选择您要设置的数据); } }