Пример #1
0
 public ActionResult FecharComDiferenca(FecharMovimentoForm form)
 {
     return(this.Handle(form)
            .With(x => this.fechaMovimentoService.FecharComDiferenca(
                      x.SaldoCaixa.ToDecimal2(),
                      x.SaldoConta.ToDecimal2()))
            .OnSuccess(x => this.RedirectToAction("Fechado"))
            .OnFailure(x => this.View("Fechar", x)));
 }
Пример #2
0
 public ActionResult Fechar(FecharMovimentoForm form)
 {
     return(this.Handle(form)
            .With(x => form.Fechamento = this.fechaMovimentoService.Fechar(
                      form.SaldoCaixa.ToDecimal2(),
                      form.SaldoConta.ToDecimal2()))
            .OnSuccess(x => x.Fechamento.Batido == false ?
                       (ActionResult)this.View("Diferenca", x) :
                       this.RedirectToAction("Fechado"))
            .OnFailure(this.View));
 }