예제 #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));
        }