public static int Editzhu(t_preturn a, List <t_preturn_zi> b) { erpsystemEntities1 stu = new erpsystemEntities1(); var v = (from p in stu.t_preturn where p.Pbillno == a.Pbillno select p).First(); v.Pbillno = a.Pbillno; v.supplierid = a.supplierid; v.Pdata = a.Pdata; v.PriceOfTax = a.PriceOfTax; v.storehouseID = a.storehouseID; v.CoinId = a.CoinId; v.ExchRate = a.ExchRate; v.warehouseid = a.warehouseid; var c = (from p in stu.t_preturn_zi where p.Pbillno == a.Pbillno select p); foreach (var items in c) { stu.t_preturn_zi.Remove(items); } if (b != null) { foreach (var item in b) { stu.t_preturn_zi.Add(item); } } return(stu.SaveChanges()); }
public static int Add(t_preturn a) { erpsystemEntities1 stu = new erpsystemEntities1(); stu.t_preturn.Add(a); return(stu.SaveChanges()); }
public static int Editzhu(t_preturn a, List <t_preturn_zi> b) { return(lzxServer.Editzhu(a, b)); }
public static int Add(t_preturn a) { return(lzxServer.Add(a)); }
public ActionResult Editzhu(t_preturn a, List <t_preturn_zi> b) { return(Json(lzxamanage.Editzhu(a, b), JsonRequestBehavior.AllowGet)); }
public ActionResult Add(t_preturn a) { return(Json(lzxamanage.Add(a), JsonRequestBehavior.AllowGet)); }