public bool SaveSricDeptData(string action, out string msg) { msg = string.Empty; bool success = false; if (SricDeptData == null || SricDeptData.Count == 0) { return(success); } foreach (var item in SricDeptData) { item.MenuID = DataAccess.Enum.Menu.SRIC.ToString(); item.DataUser = SessionManager.UserName; item.DataUpdatedOn = DateTime.Now; item.DataCaptYM = SessionManager.DataCaptYR; item.DataStatus = FormCommonMethods.GetStatusByAction(action); item.DataValid = "Y"; item.DataLocked = "N"; item.DataStatusLog = SessionManager.UserName + " " + DateTime.Now.ToString("ddd, dd MMM yyyy HH:mm:ss"); } try { FormsRepository formsRepository = new FormsRepository(); DataTable dt = ToDataTable(SricDeptData); success = formsRepository.UpdateBulkSricDeptFormData(dt, SessionManager.DataCaptYR); } catch (Exception ex) { } return(success); }