示例#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));
        }
 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;
     }
 }
 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));
        }