public ActionResult DeleteOrder(long id) { Logic.DictResponse res = new Logic.DictResponse(); res._state = false; return(Content(res.ToJson())); }
public ActionResult DeleteDBBak(string fileName) { string fileDir = Server.MapPath("~/db.bak/"); System.IO.File.Delete(System.IO.Path.Combine(fileDir, fileName)); EAP.Logic.DictResponse res = new Logic.DictResponse(); res._state = true; return Content(res.ToJson()); }
public ActionResult DeleteDBBak(string fileName) { string fileDir = Server.MapPath("~/db.bak/"); System.IO.File.Delete(System.IO.Path.Combine(fileDir, fileName)); EAP.Logic.DictResponse res = new Logic.DictResponse(); res._state = true; return(Content(res.ToJson())); }
public ActionResult ChangeBank(long fid, long bid) { EAP.Logic.DictResponse res = new Logic.DictResponse(); Z01FinancialFlow ff = new Z01FinancialFlow(); ff.FlowID = fid; ff.BankID = bid; db.Update(ff); res._state = true; return Content(res.ToJson()); }
public ActionResult ChangeBank(long fid, long bid) { EAP.Logic.DictResponse res = new Logic.DictResponse(); Z01FinancialFlow ff = new Z01FinancialFlow(); ff.FlowID = fid; ff.BankID = bid; db.Update(ff); res._state = true; return(Content(res.ToJson())); }
public ActionResult ChangeOrderDate(long fid, DateTime dt) { EAP.Logic.DictResponse res = new Logic.DictResponse(); Z01FinancialFlow ff = new Z01FinancialFlow(); ff.FlowID = fid; ff.CreateDate = dt; db.Update(ff); res._state = true; return(Content(res.ToJson())); }
/// <summary> /// 改用户 /// </summary> /// <param name="oid"></param> /// <param name="cid"></param> /// <returns></returns> public ActionResult ChangeOrderCustomer(long oid, long cid) { EAP.Logic.DictResponse res = new Logic.DictResponse(); Z10Order data = new Z10Order(); data.OrderID = oid; data.CustomerID = cid; db.Update(data); res._state = true; return Content(res.ToJson()); }
/// <summary> /// 改用户 /// </summary> /// <param name="oid"></param> /// <param name="cid"></param> /// <returns></returns> public ActionResult ChangeOrderCustomer(long oid, long cid) { EAP.Logic.DictResponse res = new Logic.DictResponse(); Z10Order data = new Z10Order(); data.OrderID = oid; data.CustomerID = cid; db.Update(data); res._state = true; return(Content(res.ToJson())); }
public ActionResult SaveProduct_S3(decimal count, decimal?price, long pid, long?did, string color, string size) { if (count <= 0) { return(Content("数量必须大于0。")); } var Price = price ?? 0; EAP.Logic.DictResponse res = new Logic.DictResponse(); var tenantID = _tenant.TenantID.Value; //更新商品库 if (!db.Exists <Z10DepotProduct>("ProductID=@ProductID and DepotID=@DepotID and TenantID=@TenantID", db.CreateParameter("ProductID", pid), db.CreateParameter("DepotID", did ?? 0), db.CreateParameter("TenantID", tenantID))) { Z10DepotProduct xProduct = new Z10DepotProduct(); xProduct.TenantID = tenantID; xProduct.ProductID = pid; xProduct.DepotID = did ?? 0; xProduct.StockSum = count; xProduct.InSum = count; xProduct.Creator = _user.UserID.Value; db.Insert(xProduct); } else { string sqlUpdateDepot = "update Z10DepotProduct set StockSum=StockSum + @itemHappened, InSum=InSum + @itemHappened" + " where ProductID=@ProductID and DepotID=@DepotID"; db.ExecuteNonQuery(sqlUpdateDepot, db.CreateParameter("itemHappened", count), db.CreateParameter("ProductID", pid), db.CreateParameter("DepotID", did ?? 0)); } //更新库存详情 Z10DepotProductDetail dpd = new Z10DepotProductDetail(); dpd.TenantID = tenantID; dpd.ProductID = pid; dpd.DepotID = did ?? 0; dpd.OrderID = 0; dpd.StockSum = count; dpd.InSum = count; dpd.ExtColor = color; dpd.ExtSize = size; dpd.PriceStock = Price; dpd.Creator = _user.UserID.Value; db.Insert(dpd); res._state = true; return(Content(res.ToJson())); }
public ActionResult SelectProduct_S2(long productID, string qTitle) { var _product = db.FindUnique <Z01Beetle.Entity.Z01Product>(productID); EAP.Logic.DictResponse res = new Logic.DictResponse(); if (_product != null) { res._state = true; res._data.Add("price", _product.PriceStock.Value.ToString("0.##")); } else { res._state = false; res._message = "错误的商品。"; } return(Content(res.ToJson())); }
public ActionResult ChangeStatus(long oid, int xsts, bool isAdd) { Logic.DictResponse res = new Logic.DictResponse(); res._state = false; res._message = "有错误"; string sql = ""; if (isAdd) { sql = "update Z10Order set OrderStatus=(OrderStatus|" + xsts + ") where OrderID=" + oid; } else { sql = "update Z10Order set OrderStatus=(OrderStatus&~" + xsts + ") where OrderID=" + oid; } db.ExecuteNonQuery(sql); res._state = true; return Content(res.ToJson()); }
public ActionResult ChangeStatus(long oid, int xsts, bool isAdd) { Logic.DictResponse res = new Logic.DictResponse(); res._state = false; res._message = "有错误"; string sql = ""; if (isAdd) { sql = "update Z10Order set OrderStatus=(OrderStatus|" + xsts + ") where OrderID=" + oid; } else { sql = "update Z10Order set OrderStatus=(OrderStatus&~" + xsts + ") where OrderID=" + oid; } db.ExecuteNonQuery(sql); res._state = true; return(Content(res.ToJson())); }
public ActionResult SelectProduct_S2(long productID, string qTitle) { var _product = db.FindUnique<Z01Beetle.Entity.Z01Product>(productID); EAP.Logic.DictResponse res = new Logic.DictResponse(); if (_product != null) { res._state = true; res._data.Add("price", _product.PriceStock.Value.ToString("0.##")); } else { res._state = false; res._message = "错误的商品。"; } return Content(res.ToJson()); }
public ActionResult DeleteOrder(long id) { Logic.DictResponse res = new Logic.DictResponse(); res._state = false; return Content(res.ToJson()); }
public ActionResult SaveProduct_S3(decimal count, decimal? price, long pid, long? did, string color, string size) { if (count <= 0) { return Content("数量必须大于0。"); } var Price = price ?? 0; EAP.Logic.DictResponse res = new Logic.DictResponse(); var tenantID = _tenant.TenantID.Value; //更新商品库 if (!db.Exists<Z10DepotProduct>("ProductID=@ProductID and DepotID=@DepotID and TenantID=@TenantID", db.CreateParameter("ProductID", pid), db.CreateParameter("DepotID", did ?? 0), db.CreateParameter("TenantID", tenantID))) { Z10DepotProduct xProduct = new Z10DepotProduct(); xProduct.TenantID = tenantID; xProduct.ProductID = pid; xProduct.DepotID = did ?? 0; xProduct.StockSum = count; xProduct.InSum = count; xProduct.Creator = _user.UserID.Value; db.Insert(xProduct); } else { string sqlUpdateDepot = "update Z10DepotProduct set StockSum=StockSum + @itemHappened, InSum=InSum + @itemHappened" + " where ProductID=@ProductID and DepotID=@DepotID"; db.ExecuteNonQuery(sqlUpdateDepot, db.CreateParameter("itemHappened", count), db.CreateParameter("ProductID", pid), db.CreateParameter("DepotID", did ?? 0)); } //更新库存详情 Z10DepotProductDetail dpd = new Z10DepotProductDetail(); dpd.TenantID = tenantID; dpd.ProductID = pid; dpd.DepotID = did ?? 0; dpd.OrderID = 0; dpd.StockSum = count; dpd.InSum = count; dpd.ExtColor = color; dpd.ExtSize = size; dpd.PriceStock = Price; dpd.Creator = _user.UserID.Value; db.Insert(dpd); res._state = true; return Content(res.ToJson()); }
public ActionResult ChangeOrderDate(long fid, DateTime dt) { EAP.Logic.DictResponse res = new Logic.DictResponse(); Z01FinancialFlow ff = new Z01FinancialFlow(); ff.FlowID = fid; ff.CreateDate = dt; db.Update(ff); res._state = true; return Content(res.ToJson()); }