public object Get(ProductBySku request)
        {
            var resp           = new Dto <Product>();
            var productHandler = new ProductHandler(Db);

            var product = productHandler.Get(request.Sku, request.IncludeDeleted).ConvertTo <Product>();

            resp.Result = product;
            resp.Result.QuantityOnHand = InventoryHandler.GetQuantityOnHand(product.Id);

            return(resp);
        }
        public object Get(Product request)
        {
            var resp           = new Dto <Product>();
            var productHandler = new ProductHandler(Db);

            var product = productHandler.Get(request.Id, request.IncludeDeleted).ConvertTo <Product>();

            resp.Result = product;
            resp.Result.QuantityOnHand = InventoryHandler.GetQuantityOnHand(product.Id);
            resp.Result.Images         =
                ProductImageHandler.GetImages(request.Id, request.IncludeDeleted).ConvertAll(x => x.ConvertTo <Image>());

            return(resp);
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["user"] != null)
            {
                u = (User)Session["user"];
            }
            var masterPage = Master as TemplatePage;                                                        // DEFINE THE "MASTERPAGE"

            masterPage.setPageViewAfterLogin(u);                                                            // SET THE LINK VIEW

            DataTable watches = ProductHandler.Get();                                                       // GET "THE DATA", HANDLER -> REPO -> DB

            catalog.DataSource = watches;
            catalog.DataBind();
        }
Ejemplo n.º 4
0
 public IEnumerable <ProductDataContract> Get(int pageIndex, int pageSize)
 {
     return(handler.Get(pageIndex, pageSize));
 }