Ejemplo n.º 1
0
        public ActionResult Index()
        {
            EmployeeViewModel viewModelEmployee;
            Employee          employee = new Employee();

            viewModelEmployee         = Mapper.Map <Employee, EmployeeViewModel>(employee);
            viewModelEmployee.Type    = _employeeTypeService.GetAllEmployeeTypesDropdown();
            viewModelEmployee.PetList = _petService.GetAllPetDropdown();
            return(View(viewModelEmployee));
        }
Ejemplo n.º 2
0
        public CustomerViewModel loadIndexPage()
        {
            CustomerViewModel customerViewModel;
            Customer          customer = new Customer();

            customerViewModel         = Mapper.Map <Customer, CustomerViewModel>(customer);
            customerViewModel.PetList = _petService.GetAllPetDropdown("0");
            ////customerViewModel.PetList = _petService.GetAllPetDropdown();
            ////customerViewModel.PetId = customerFormViewModel.PetId;
            customerViewModel.PetCollection = _customerPetService.GetPetsByCustomerId(Guid.NewGuid()).ToList();
            customerViewModel.Type          = _employeeTypeService.GetAllEmployeeTypesDropdown();
            return(customerViewModel);
        }