public bool AddUser(user user)
 {
     try
     {
         using (QLBH_PHONE_ENTITY data = new QLBH_PHONE_ENTITY())
         {
             data.users.Add(user);
             data.SaveChanges();
             return true;
         }
     }
     catch (Exception e)
     {
         Debug.WriteLine(e);
         return false;
     }
 }
 public bool UpdateUser(user user)
 {
     try
     {
         using (QLBH_PHONE_ENTITY data = new QLBH_PHONE_ENTITY())
         {
             //Code first
             //data.Entry(user).State = EntityState.Modified;
             //data.SaveChanges();
             //return true;
             //////////// Code change
             var getItem = data.users.Single(p => p.id == user.id);
             getItem.id_role = user.id_role;
             getItem.address = user.address;
             getItem.email = user.email;
             getItem.name = user.name;
             getItem.password = user.password;
             getItem.phone_number = user.phone_number;
             data.SaveChanges();
             return true;
         }
     }
     catch (Exception e)
     {
         Debug.WriteLine(e);
         return false;
     }
 }