示例#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);
        }