Exemple #1
0
 public bool  UpdateOrder(T_Order order)
 {
     using (var db = new cakedbEntities())
     {
         return(db.SaveChanges() > 0);
     }
 }
Exemple #2
0
 public bool AddOrderLog(T_OrderLog model)
 {
     using (var db = new cakedbEntities())
     {
         db.Set <T_OrderLog>().Add(model);
         return(db.SaveChanges() > 0);
     }
 }
Exemple #3
0
 public bool AddAdmin(T_Admin model)
 {
     using (var db = new cakedbEntities())
     {
         db.T_Admin.Add(model);
         return(db.SaveChanges() > 0);
     }
 }
Exemple #4
0
 public bool InsertCart(T_Cart model)
 {
     using (var db = new cakedbEntities())
     {
         db.Set <T_Cart>().Add(model);
         return(db.SaveChanges() > 0);
     }
 }
Exemple #5
0
 public bool InsertAddress(T_Address model)
 {
     using (var db = new cakedbEntities())
     {
         db.Set <T_Address>().Add(model);
         return(db.SaveChanges() > 0);
     }
 }
Exemple #6
0
 public bool InsertUserModebyMobile(T_User model)
 {
     using (var db = new cakedbEntities())
     {
         db.Set <T_User>().Add(model);
         return(db.SaveChanges() > 0);
     }
 }
Exemple #7
0
        public bool AddProductDetail(T_ProductDetail model)
        {
            using (var db = new cakedbEntities())
            {
                db.Set <T_ProductDetail>().Add(model);

                return(db.SaveChanges() > 0);
            }
        }
Exemple #8
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);
            }
        }
Exemple #9
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);
     }
 }
Exemple #10
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);
            }
        }