/// <summary> Add record to Changes Log and Workflow History </summary> /// <param name="context"></param> /// <param name="data"></param> /// <param name="changes"></param> /// <param name="formType"></param> /// <param name="actionType"></param> /// <param name="role"></param> /// <param name="actor"></param> /// <param name="comment"></param> private void LogsActivity(EMSDataModel context, PRODUCT_DEVELOPMENT data, Dictionary <string, string[]> changes, int formType, int actionType, int role, string actor, string comment = null) { try { foreach (var map in changes) { refService.AddChangeLog(context, formType, data.PD_ID.ToString(), map.Key, map.Value[0], map.Value[1], actor, DateTime.Now ); } refService.AddWorkflowHistory(context, formType, Convert.ToInt64(data.PD_ID), actionType, actor, DateTime.Now, role, comment ); context.SaveChanges(); } catch (Exception ex) { throw this.HandleException("Exception occured on Brand Registration Service. See Inner Exception property to see details", ex); } }
private void LogsActivity(EMSDataModel context, MASTER_FINANCIAL_RATIO data, Dictionary <string, string[]> changes, int formType, int actionType, int role, string actor, string comment = null) { try { foreach (var map in changes) { refService.AddChangeLog(context, formType, data.FINANCERATIO_ID.ToString(), map.Key, map.Value[0], map.Value[1], actor, DateTime.Now ); } refService.AddWorkflowHistory(context, formType, data.FINANCERATIO_ID, actionType, actor, DateTime.Now, role, comment ); context.SaveChanges(); } catch (Exception ex) { throw this.HandleException("Exception occured on FinanceRatioManagementService. See Inner Exception property to see details", ex); } }