Пример #1
0
        // GET: Ticket/Create
        public virtual ActionResult Create()
        {
            TicketViewModel model = new TicketViewModel();

            model.AllProducts = _productHandler.GetAll().Select(ProductViewModelFactory.Create);
            return(View(model));
        }
Пример #2
0
        public virtual ActionResult Create()
        {
            ProductViewModel model = new ProductViewModel();

            model.AllCustomers = _customerHandler.GetAll().Select(CustomerViewModelFactory.Create);
            return(View(model));
        }
Пример #3
0
 protected void Initialize()
 {
     if (Settings.Prefetch)
     {
         bool countInternal = false, countExternal = false;
         Parallel.Invoke(
             () => { countInternal = InternalHandler.GetAll(); },
             () => { countExternal = ExternalHandler.GetAll(); }
             );
         HasUpdates = countInternal || countExternal;
     }
     else
     {
         HasUpdates = true;
     }
 }
Пример #4
0
 public virtual ActionResult Index()
 {
     return(View(_customerHandler.GetAll().Select(CustomerViewModelFactory.Create)));
 }
Пример #5
0
        // GET: Product
        public virtual ActionResult Index()
        {
            var model = _productHandler.GetAll().Select(ProductViewModelFactory.Create);

            return(View(model));
        }
Пример #6
0
        public IEnumerable <TViewModel> GetAll()
        {
            var result = _service.GetAll();

            return(Mapper.Map <IEnumerable <TBaseModel>, IEnumerable <TViewModel> >(result));
        }