Beispiel #1
0
        public JsonResult UpdateInvoicedLeadAssignmentStatus([FromBody] List <ReportInvoiceVM> reportInvoiceVMs)
        {
            var userName = User.Identity.Name;

            foreach (var reportInvoice in reportInvoiceVMs)
            {
                var action    = _actionRepo.GetAction(reportInvoice.CurrentActionId);
                var nextState = _actionRepo.GetState(action.NextStateId);

                _leadAssRepo.SetState(reportInvoice.LeadAssignmentId, nextState.Id, nextState.Name, userName);
            }

            return(_uow.Commit() ? Json(Ok()) : Json(StatusCode(StatusCodes.Status500InternalServerError)));
        }