Beispiel #1
0
        // GET: Client
        public async Task <ActionResult> Index()
        {
            var client = await _repositoryClient.GetAll();

            if (HttpExtensionsValidate.IsAjaxRequest(Request))
            {
                return(PartialView("Index", client));
            }

            return(View(client));
        }
Beispiel #2
0
        public async Task <IActionResult> Index()
        {
            var loan = await _repositoryLoan.GetAll();

            if (HttpExtensionsValidate.IsAjaxRequest(Request))
            {
                return(PartialView("Index", loan));
            }

            return(View(loan));
        }
Beispiel #3
0
        // GET: Parcela
        public async Task <ActionResult> Index(Guid idLoan)
        {
            _idLoan = idLoan;
            var res = await _repositoryParcela.GetAllByIdLoan(idLoan);

            if (HttpExtensionsValidate.IsAjaxRequest(Request))
            {
                return(PartialView("ListaPorLoan", res));
            }

            return(View(res));
        }
Beispiel #4
0
        public async Task <IActionResult> Index()
        {
            var loanQuery = await _repositoryLoan.GetLoanQuery(EStatusEmprestimo.Aberto);

            ViewBag.TotalemprestimosAbertos = await _repositoryLoan.GetTotalOrderByStatus(EStatusEmprestimo.Aberto);

            ViewBag.ValorRecebido            = string.Format(CultureInfo.GetCultureInfo("pt-BR"), "{0:C}", await _repositoryParcela.GetTotalRecebido(EStatusParcela.Paga));
            ViewBag.valorTotalDeEmprestimos  = string.Format(CultureInfo.GetCultureInfo("pt-BR"), "{0:C}", await _repositoryLoan.GetMoneyTotal());
            ViewBag.emprestimosDoUtimoMes    = string.Format(CultureInfo.GetCultureInfo("pt-BR"), "{0:C}", await _repositoryLoan.GetTotalByThirtyToday(DateTime.Now.AddMonths(-1), DateTime.Now));
            ViewBag.emprestimosUltimos15Dias = string.Format(CultureInfo.GetCultureInfo("pt-BR"), "{0:C}", await _repositoryLoan.GetTotalByThirtyToday(DateTime.Now.AddDays(-15), DateTime.Now));
            //var emprestimosAberto = await _repositoryLoan.GetAllOrderByStatus(EStatusEmprestimo.Aberto);

            if (HttpExtensionsValidate.IsAjaxRequest(Request))
            {
                return(PartialView("Index", loanQuery));
            }

            return(View(loanQuery));
        }