Beispiel #1
0
        public string UpdateBalance(string customerId)
        {
            int cId = 0;

            Int32.TryParse(customerId, out cId);
            decimal balance = CustomersManager.GetCustomerBalance(cId);

            return(String.Format("{0:N2}", balance));
        }
Beispiel #2
0
        public ActionResult BillingInfo(string customerId)
        {
            int id = 0;

            Int32.TryParse(customerId, out id);
            CustomerDT       customer = CustomersManager.GetCustomer(id);
            List <InvoiceDT> invoices = CustomersManager.GetCustomerInvoices(id);
            decimal          balance  = CustomersManager.GetCustomerBalance(id);
            string           cardType = string.Empty;

            ViewBag.Customer   = customer;
            ViewBag.Invoices   = invoices;
            ViewBag.Balance    = balance;
            ViewBag.CardNumber = CustomersManager.GetLastFourDigitCreditCards(customer.Id, out cardType);
            ViewBag.CardType   = cardType;

            return(View());
        }