/// <summary> /// 通过审核后修改相应库存数量 /// </summary> /// <param name="danhao"></param> /// <param name="Count"></param> /// <returns></returns> public static int RuKuSHHou(int cpid, int Count) { StorageEntities ent = new StorageEntities(); CpGlinfo obj = ent.CpGlinfo.Find(cpid); obj.CpShuLiang += Count; return(ent.SaveChanges()); }
public static int CpGlEdit(CpGlinfo cpgl) { StorageEntities entity = new StorageEntities(); var obj = (from p in entity.CpGlinfo where p.CpID == cpgl.CpID select p).First(); obj.CpID = cpgl.CpID; obj.Cpbh = cpgl.Cpbh; obj.CpXsName = obj.CpXsName; obj.CpSx = cpgl.CpSx; obj.CpXx = cpgl.CpXx; obj.CpShuLiang = cpgl.CpShuLiang; obj.CpPrice = cpgl.CpPrice; obj.CkId = cpgl.CkId; obj.Specification = cpgl.Specification; obj.CpLb = cpgl.CpLb; obj.CpJlName = cpgl.CpJlName; obj.UserId = cpgl.UserId; obj.KwId = cpgl.KwId; obj.remark = cpgl.remark; return(entity.SaveChanges()); }
//修改 public static int CpGlEdit(CpGlinfo cpgl) { return(DAL.LLQ.CpGlService.CpGlEdit(cpgl)); }
//修改 public ActionResult CpGlEdit(CpGlinfo cpgl) { return(Json(BLL.LLQ.CpGlManager.CpGlEdit(cpgl), JsonRequestBehavior.AllowGet)); }
//新增 public ActionResult CpGlAdd(CpGlinfo cpgl) { cpgl.State = true; return(Json(BLL.LLQ.CpGlManager.CpGlAdd(cpgl), JsonRequestBehavior.AllowGet)); }