コード例 #1
0
        /// <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);
            }
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 /// <summary> Part of Changes Log Step which Set All Changed Field into Table Changes Log </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, BusinessObject.POA 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.POA_ID.ToString(), map.Key, map.Value[0], map.Value[1], actor, DateTime.Now);
         }
         context.SaveChanges();
     }
     catch (Exception ex)
     {
         throw;
     }
 }
コード例 #4
0
 /// <summary> Part of Changes Log Step which Set All Changed Field into Table Changes Log </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, POA_EXCISER 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.POA_ID.ToString(), map.Key, map.Value[0], map.Value[1], actor, DateTime.Now);
         }
         context.SaveChanges();
     }
     catch (Exception ex)
     {
         throw this.HandleException("Exception occured on POA Exciser Service. See Inner Exception property to see details", ex);
     }
 }