public dynamic Confirm(CashBankMutation model) { try { var data = _cashBankMutationService.GetObjectById(model.Id); model = _cashBankMutationService.ConfirmObject(data, model.ConfirmationDate.Value, _cashMutationService, _cashBankService); } catch (Exception ex) { LOG.Error("Confirm Failed", ex); model.Errors.Add("Generic", "Error" + ex); } return(Json(new { model.Errors })); }
public dynamic Confirm(CashBankMutation model) { try { if (!AuthenticationModel.IsAllowed("Confirm", Core.Constants.Constant.MenuName.CashBankMutation, Core.Constants.Constant.MenuGroupName.Master)) { Dictionary <string, string> Errors = new Dictionary <string, string>(); Errors.Add("Generic", "You are Not Allowed to Confirm Record"); return(Json(new { Errors }, JsonRequestBehavior.AllowGet)); } var data = _cashBankMutationService.GetObjectById(model.Id); model = _cashBankMutationService.ConfirmObject(data, model.ConfirmationDate.Value, _cashMutationService, _cashBankService, _generalLedgerJournalService, _accountService, _closingService); } catch (Exception ex) { LOG.Error("Confirm Failed", ex); Dictionary <string, string> Errors = new Dictionary <string, string>(); Errors.Add("Generic", "Error " + ex); return(Json(new { Errors }, JsonRequestBehavior.AllowGet)); } return(Json(new { model.Errors })); }