public dr_pre_visit CreatePreVisit(dr_pre_visit info, out string error) { error = string.Empty; try { db.dr_pre_visit.Add(info); db.SaveChanges(); return info; } catch (System.Data.Entity.Validation.DbEntityValidationException ex) { error = Share.BaseTool.FormatExceptionMessage(ex); return null; } }
public dr_pre_visit CreatePreVisit(dr_pre_visit info, out string error) { error = string.Empty; try { dr_visit_DA da = new dr_visit_DA(); da.CreatePreVisit(info, out error); return info; } catch (Exception ex) { error += Share.BaseTool.FormatExceptionMessage(ex); return null; } }