Пример #1
0
 public bool AddUserDetails(User_Details u)
 {
     try
     {
         db.User_Details.Add(u);
         db.SaveChanges();
         return(true);
     }
     catch
     {
     }
     return(false);
 }
Пример #2
0
 public bool EditStudent(User_Details u)
 {
     try
     {
         User_Details user = db.User_Details.Find(u.UserID);
         db.User_Details.Remove(user);
         db.User_Details.Add(u);
         db.SaveChanges();
         return(true);
     }
     catch
     {
     }
     return(false);
 }
Пример #3
0
        public bool DeleteStudent(int id)
        {
            bool status = false;

            try
            {
                User_Details cou = db.User_Details.Find(id);
                db.User_Details.Remove(cou);
                db.SaveChanges();
                status = true;
            }
            catch
            {
            }
            return(status);
        }