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; } }
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; } }