//销售退货单修改 public static int Getenid(billtui blii, List <billtutype> list) { erpsystemEntities1 ent = new erpsystemEntities1(); var v = (from p in ent.billtui where p.billno == blii.billno select p).First(); v.billno = blii.billno; v.billdate = blii.billdate; v.checkstatus = blii.checkstatus; //v.clientmaster = blii.clientmaster; v.customerid = blii.customerid; var data = from p in ent.billtutype where p.billno == blii.billno select p; foreach (var item in data) { ent.billtutype.Remove(item); } if (list != null) { foreach (var item in list) { ent.billtutype.Add(item); } } return(ent.SaveChanges()); }
//销售退货单新增 public static int GetAdd(billtui blii, List <billtutype> list) { erpsystemEntities1 ent = new erpsystemEntities1(); ent.billtui.Add(blii); if (list != null) { foreach (var item in list) { ent.billtutype.Add(item); } } return(ent.SaveChanges()); }
//修改 public static int Getenid(billtui blii, List <billtutype> list) { return(MVCSerice.Getenid(blii, list)); }
//修改 public ActionResult Getenid(billtui blii, List <billtutype> list) { return(Json(MVCManager.Getenid(blii, list), JsonRequestBehavior.AllowGet)); }