Ejemplo n.º 1
0
 public void EditAdmin(Admin admin)
 {
     using (MSMSDBEntities db = new MSMSDBEntities())
     {
         db.Entry(admin).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Ejemplo n.º 2
0
        //2.11)This method is used to edit owner in database
        public int EditOwner(Owner_Registration adm)
        {
            int i = 0;

            using (MSMSDBEntities db = new MSMSDBEntities())
            {
                db.Entry(adm).State = EntityState.Modified;
                i += db.SaveChanges();
            }
            return(i);
        }
Ejemplo n.º 3
0
        //2.9)This method is used to change Owner password in database
        public int OwnerChangePassword(string ownerID, string pwd)
        {
            int i = 0;

            using (MSMSDBEntities db = new MSMSDBEntities())
            {
                var owner = db.Owner_Registration.Find(ownerID);
                owner.Password = pwd;
                db.Owner_Registration.Attach(owner);
                db.Entry(owner).Property(a => a.Password).IsModified = true;
                i += db.SaveChanges();
            }
            return(i);
        }
Ejemplo n.º 4
0
        public int ChangePassword(string AdminID, string Pwd)
        {
            int i = 0;

            using (MSMSDBEntities db = new MSMSDBEntities())
            {
                var admin = db.Admins.Find(AdminID);
                admin.Password = Pwd;
                db.Admins.Attach(admin);
                db.Entry(admin).Property(a => a.Password).IsModified = true;
                i += db.SaveChanges();
            }
            return(i);
        }