Example #1
0
        public ActionResult Index()
        {
            var bills         = DB.CollectedBills.OrderByDescending(m => m.id).Take(3).ToList();
            var gfCodes       = DB.GFSCodes.ToList();
            var billViewModel = new CollectedBillViewModel
            {
                collectedBills = bills,
                gFSCodes       = gfCodes
            };

            return(View(billViewModel));
        }
Example #2
0
        public ActionResult Edit(int id)
        {
            var bill    = DB.CollectedBills.SingleOrDefault(c => c.id == id);
            var gfCodes = DB.GFSCodes.ToList();

            var editBillvm = new CollectedBillViewModel
            {
                collectedBill = bill,
                gFSCodes      = gfCodes
            };



            return(View(editBillvm));
        }