//public void AddWorkflowHistory(WORKFLOW_HISTORY workflowHistory, string EmailCreator, string EmailPOA, string EmailManager, string emailBody) //{ // _xmlMapper.InsertOrUpdate(workflowHistory); // ILogger logger= new NLogLogger(); // IMessageService messageService = new MessageService(logger); // var subject = "CK5 Status No: " + workflowHistory.FORM_NUMBER; // var emailList = new List<string>(); // if(!string.IsNullOrEmpty(EmailCreator)) // emailList.Add(EmailCreator); // if(!string.IsNullOrEmpty(EmailPOA)) // emailList.Add(EmailPOA); // if(!string.IsNullOrEmpty(EmailManager)) // emailList.Add(EmailManager); // if (emailList.Count > 0) // { // messageService.SendEmailToList(emailList, subject, emailBody, false); // } //} private void AddWorkflowHistory(WORKFLOW_HISTORY workflowHistory) { if (_xmlMapper.Errors.Count == 0) { _xmlMapper.InsertOrUpdate(workflowHistory); } }
public WORKFLOW_HISTORY GetAdminApproverList() { try { WORKFLOW_HISTORY additional = new WORKFLOW_HISTORY(); var approvers = this.GetAdminApprovers(); approvers = approvers.Distinct(); var accounts = ""; foreach (var approver in approvers) { if (accounts == "") { accounts += approver.REFF_VALUE; } else { accounts += ", " + approver.REFF_VALUE; } } additional.ACTION_BY = accounts; additional.ACTION = (int)Enums.ActionType.WaitingForApproval; additional.ROLE = (int)Enums.UserRole.AdminApprover; return(additional); } catch (Exception ex) { throw this.HandleException("Exception occured on Set Default Printout Layout. See Inner Exception property to see details", ex); } }
public void Save(WorkflowHistoryDto history) { WORKFLOW_HISTORY dbData = null; if (history.WORKFLOW_HISTORY_ID > 0) { dbData = _repository.GetByID(history.WORKFLOW_HISTORY_ID); Mapper.Map <WorkflowHistoryDto, WORKFLOW_HISTORY>(history, dbData); } else { dbData = Mapper.Map <WORKFLOW_HISTORY>(history); _repository.Insert(dbData); } }
public void AddWorkflowHistory(EMSDataModel context, int formType, long formId, int action, string actor, DateTime?logTime, int role, string comment = null, string formNumber = null) { try { WORKFLOW_HISTORY history = new WORKFLOW_HISTORY() { FORM_TYPE_ID = formType, FORM_ID = formId, ACTION = action, ACTION_BY = actor, ACTION_DATE = logTime, ROLE = role, COMMENT = comment, FORM_NUMBER = formNumber }; context.WORKFLOW_HISTORY.Add(history); } catch (Exception ex) { throw this.HandleException("Exception occured on SystemReferenceService. See Inner Exception property to see details", ex); } }