Exemple #1
0
        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());
        }
Exemple #2
0
        public static int Add(t_preturn a)
        {
            erpsystemEntities1 stu = new erpsystemEntities1();

            stu.t_preturn.Add(a);
            return(stu.SaveChanges());
        }
Exemple #3
0
 public static int Editzhu(t_preturn a, List <t_preturn_zi> b)
 {
     return(lzxServer.Editzhu(a, b));
 }
Exemple #4
0
 public static int Add(t_preturn a)
 {
     return(lzxServer.Add(a));
 }
Exemple #5
0
 public ActionResult Editzhu(t_preturn a, List <t_preturn_zi> b)
 {
     return(Json(lzxamanage.Editzhu(a, b), JsonRequestBehavior.AllowGet));
 }
Exemple #6
0
 public ActionResult Add(t_preturn a)
 {
     return(Json(lzxamanage.Add(a), JsonRequestBehavior.AllowGet));
 }