public bool UpdateOrder(T_Order order) { using (var db = new cakedbEntities()) { return(db.SaveChanges() > 0); } }
public bool AddOrderLog(T_OrderLog model) { using (var db = new cakedbEntities()) { db.Set <T_OrderLog>().Add(model); return(db.SaveChanges() > 0); } }
public bool AddAdmin(T_Admin model) { using (var db = new cakedbEntities()) { db.T_Admin.Add(model); return(db.SaveChanges() > 0); } }
public bool InsertCart(T_Cart model) { using (var db = new cakedbEntities()) { db.Set <T_Cart>().Add(model); return(db.SaveChanges() > 0); } }
public bool InsertAddress(T_Address model) { using (var db = new cakedbEntities()) { db.Set <T_Address>().Add(model); return(db.SaveChanges() > 0); } }
public bool InsertUserModebyMobile(T_User model) { using (var db = new cakedbEntities()) { db.Set <T_User>().Add(model); return(db.SaveChanges() > 0); } }
public bool AddProductDetail(T_ProductDetail model) { using (var db = new cakedbEntities()) { db.Set <T_ProductDetail>().Add(model); return(db.SaveChanges() > 0); } }
public bool UpdateProductDtail(T_ProductDetail model) { using (var db = new cakedbEntities()) { db.T_ProductDetail.Attach(model); db.Entry <T_ProductDetail>(model).State = System.Data.Entity.EntityState.Modified; return(db.SaveChanges() > 0); } }
public bool DelCartById(int CartId, int userid) { using (var db = new cakedbEntities()) { var model = db.T_Cart.Where(wo => wo.Id == CartId && wo.UserId == userid).FirstOrDefault(); if (model != null) { db.T_Cart.Remove(model); } return(db.SaveChanges() > 0); } }
public bool UpdateUser(T_User model) { using (var db = new cakedbEntities()) { db.T_User.Attach(model); db.Entry <T_User>(model).State = System.Data.Entity.EntityState.Modified; //model.MaKaCurrency = makabi; //model.GradeName = Gard(model.InvitationNumber, (int)model.OrderPrice, model.MaKaCurrency); return(db.SaveChanges() > 0); } }