Пример #1
0
        public IActionResult BillsList(string search = null)
        {
            var bills = _billsService.GetAllBills(search);

            var billsModel = bills.Select(s => new BillModel
            {
                Amount      = s.Amount.ToString(CultureInfo.InvariantCulture),
                BillDate    = s.BillDate,
                Description = s.Description,
                PersonName  = s.Person.Name,
                Id          = s.BillId
            }).ToList();

            return(View(new BillsListViewModel {
                Bills = billsModel, Search = search
            }));
        }
Пример #2
0
        public IActionResult Index()
        {
            var bills = _billsService.GetAllBills();

            return(View("AddBill"));
        }
Пример #3
0
 public IEnumerable <Bill> GetbillModels()
 {
     return(billService.GetAllBills());
 }
Пример #4
0
 public ActionResult <IEnumerable <Bill> > Get()
 {
     return(Ok(_billsService.GetAllBills()));
 }
Пример #5
0
        public ActionResult Index()
        {
            var model = _billsService.GetAllBills();

            return(View(model));
        }