Beispiel #1
0
 public bool Update(AgencyCommissionHistory obj)
 {
     try
     {
         obj.UpdatedDate = DateTime.Now;
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(false);
     }
     return(true);
 }
Beispiel #2
0
 public bool Delete(AgencyCommissionHistory obj)
 {
     try
     {
         _db.AgencyCommissionHistories.DeleteOnSubmit(obj);
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(false);
     }
     return(true);
 }
Beispiel #3
0
 public int Add(AgencyCommissionHistory obj)
 {
     try
     {
         _db.AgencyCommissionHistories.InsertOnSubmit(obj);
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(-1);
     }
     return(_db.AgencyCommissionHistories.Max(x => x.AgencyCommissionHistoryId));
 }