Esempio n. 1
0
        public void SendNotificationsForState(Guid billDemandUid, WorkflowState state)
        {
            var billDemand = BillDemandBuinessService.GetBillDemand(billDemandUid);
            Action <BillDemand> action;

            if (_senders.TryGetValue(state, out action))
            {
                action.Invoke(billDemand);
            }
        }
Esempio n. 2
0
        public void CheckAndSendMail(Guid billDemandUid)
        {
            var dataLoadOptions = new DataLoadOptions();

            dataLoadOptions.LoadWith <BillDemand>(d => d.Author);
            dataLoadOptions.LoadWith <BillDemand>(d => d.Filial);

            var billDemand = BillDemandBuinessService.GetBillDemand(billDemandUid, dataLoadOptions);

            foreach (var item in _checkings.Values)
            {
                item.Invoke(billDemand);
            }
        }
Esempio n. 3
0
        public void CheckAndSendMailForState(Guid billDemandUid, WorkflowState state)
        {
            var dataLoadOptions = new DataLoadOptions();

            dataLoadOptions.LoadWith <BillDemand>(d => d.Author);
            if (state == WorkflowState.BillDemandInAccountingWithExport)
            {
                dataLoadOptions.LoadWith <BillDemand>(d => d.Filial);
            }

            var billDemand = BillDemandBuinessService.GetBillDemand(billDemandUid, dataLoadOptions);
            Action <BillDemand> action;

            if (_checkings.TryGetValue(state, out action))
            {
                action.Invoke(billDemand);
            }
        }