Exemplo n.º 1
0
 public bool Update(ProgramRegistration obj)
 {
     try
     {
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(false);
     }
     return(true);
 }
Exemplo n.º 2
0
 public int Add(ProgramRegistration obj)
 {
     try
     {
         _db.ProgramRegistrations.InsertOnSubmit(obj);
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(-1);
     }
     return(_db.ProgramRegistrations.Max(x => x.ProgramRegistrationId));
 }