/// <summary> /// 添加卖点表 /// </summary> /// <param name="selling"></param> /// <returns></returns> public int SellingAdd(Selling selling) { db.Selling.Add(selling); int a = db.SaveChanges(); return(a); }
/// <summary> /// 修改订单 /// </summary> /// <param name="sell"></param> /// <param name="selling"></param> /// <param name="transactions"></param> /// <param name="sImg"></param> /// <returns></returns> public bool EditSELL(Sell sell, Selling selling, Transactions transactions) { db.Entry(sell).State = System.Data.Entity.EntityState.Modified; int a = db.SaveChanges(); db.Entry(selling).State = System.Data.Entity.EntityState.Modified; int b = db.SaveChanges(); db.Entry(transactions).State = System.Data.Entity.EntityState.Modified; int d = db.SaveChanges(); if (d > 0 && a > 0 && b > 0) { return(true); } else { return(false); } }