Пример #1
0
        // GET: Customer/Delete/5
        public ActionResult Delete(int id)
        {
            Lib.Customer libCustomer = CustomerRepo.GetCustomerById(id);
            var          webCustomer = new Customer
            {
                Id        = libCustomer.Id,
                FirstName = libCustomer.LastName,
                Birthday  = libCustomer.Birthday,
                StoreId   = libCustomer.StoreId
            };

            return(View(webCustomer));
        }
Пример #2
0
        // GET: Customer/Details/5
        public ActionResult Details(int id)
        {
            Lib.Customer libCustomer = CustomerRepo.GetCustomerById(id);
            Lib.Location libStore    = StoreRepo.GetAllStores().First();
            var          webCust     = new Customer
            {
                Id        = libCustomer.Id,
                FirstName = libCustomer.FirstName,
                LastName  = libCustomer.LastName,
                Birthday  = libCustomer.Birthday,
                StoreId   = libCustomer.StoreId
            };

            CustomerViewModel cvm = new CustomerViewModel(libCustomer, libStore);

            return(View(cvm));
        }