Пример #1
0
 public dr_visit CreateVisit(dr_visit info, out string error)
 {
     error = string.Empty;
     try
     {
         db.dr_visit.Add(info);
         db.SaveChanges();
         return info;
     }
     catch (System.Data.Entity.Validation.DbEntityValidationException ex)
     {
         error = Share.BaseTool.FormatExceptionMessage(ex);
         return null;
     }
 }
Пример #2
0
 public dr_visit CreateVisit(dr_visit info, out string error)
 {
     error = string.Empty;
     try
     {
         dr_visit_DA da = new dr_visit_DA();
         da.CreateVisit(info,out error);
         return info;
     }
     catch (Exception ex)
     {
         error += Share.BaseTool.FormatExceptionMessage(ex);
         return null;
     }
 }