public string Edit(DBConnectionString.Section objSection) { try { if (ModelState.IsValid) { objSection.ModifiedBy = _userStatistics.UserId; objSection.ModifiedOn = DateTime.Now; if (objSection.Update() > 0) { return(Convert.ToString(true)); } return(Convert.ToString(false)); } return(Convert.ToString(false)); } catch (Exception ex) { return(ex.Message.ToString()); } }
public string Create(DBConnectionString.Section section) { try { if (ModelState.IsValid) { section.CreatedBy = _userStatistics.UserId; section.InsertedOn = DateTime.Now; if (Convert.ToInt32(section.Insert()) > 0) { return(Convert.ToString(true)); } return(Convert.ToString(false)); } return(Convert.ToString(false)); } catch (Exception ex) { return(ex.Message.ToString()); } }