Ejemplo n.º 1
0
        // GET: Billing
        public ActionResult Index()
        {
            List <Bill>   bills  = billingManager.getAllBills();
            List <BillVM> bills2 = new List <BillVM>();

            foreach (Bill bill in bills)
            {
                string customerName = customerManager.getCustomerByID(bill.CustomerID).getName();
                bills2.Add(new BillVM(bill, customerName));
            }

            ViewBag.Title = "Billing List";

            return(View(bills2));
        }
Ejemplo n.º 2
0
        private void refreshBillingListView()
        {
            try
            {
                //Clear listboxes and return all bills
                lvwBillingLog.Items.Clear();
                bills = _billingManager.getAllBills();

                //Refresh the billing list
                foreach (Bill bill in bills)
                {
                    lvwBillingLog.Items.Add(
                        _customerManager.getCustomerByID(bill.getCustomerID()).getName());
                }

                lblStatusMessage.Content = "Billing list update success";
            }
            catch (Exception ex)
            {
                lblStatusMessage.Content = ex.Message;
            }
        }