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()); }
public ActionResult GetReferrersInfo() { UserDT user = UsersManager.GetUserByAspNetId(User.Identity.GetUserId()); List <ReferrerInfoDT> sitesInfo = SitesManager.GetReferrersInfo(); ViewBag.SitesInfo = sitesInfo; List <CustomerVM> model = new List <CustomerVM>(); var todayDate = DateTime.Now.Date; foreach (var customer in ReferrersManagers.GetCustomers(0, true).Where(x => x.CreatedAt >= todayDate)) { string type = string.Empty; CustomersManager.GetLastFourDigitCreditCards(customer.Id, out type); model.Add(CustomerVM.TransformFromCustomerDT(customer, type)); } return(View(model)); }