Example #1
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);
            }
        }
Example #2
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);
            }
        }