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