Пример #1
0
 public bool Update(UserSalary obj)
 {
     try
     {
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(false);
     }
     return(true);
 }
Пример #2
0
 public bool Delete(UserSalary obj)
 {
     try
     {
         _db.UserSalaries.DeleteOnSubmit(obj);
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(false);
     }
     return(true);
 }
Пример #3
0
 public int Add(UserSalary obj)
 {
     try
     {
         _db.UserSalaries.InsertOnSubmit(obj);
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(-1);
     }
     return(_db.UserSalaries.Max(x => x.UserSalaryId));
 }