Example #1
0
        private void loadSupplier()
        {
            SupplierBL supplierBL = new SupplierBL();

            cmbSupplier.DataSource     = supplierBL.GetSuppliers(false);
            cmbSupplier.DataTextField  = "name";
            cmbSupplier.DataValueField = "supplierID";
            cmbSupplier.DataBind();
        }
Example #2
0
        private void loadIntoForm()
        {
            CategoryBL categoryBL = new CategoryBL();

            //cmbCategory.DataSource = categoryBL.GetCategories();
            cmbCategory.DataSource     = categoryBL.GetNestedCategoriesDataTable(true, true);
            cmbCategory.DataTextField  = "name";
            cmbCategory.DataValueField = "categoryID";
            cmbCategory.DataBind();

            SupplierBL supplierBL = new SupplierBL();

            cmbSupplier.DataSource     = supplierBL.GetSuppliers(true);
            cmbSupplier.DataTextField  = "name";
            cmbSupplier.DataValueField = "supplierID";
            cmbSupplier.DataBind();


            cmbApproved.Items.Add("Sve");
            cmbApproved.Items.Add("Odobrene");
            cmbApproved.Items.Add("Neodobrene");


            cmbActive.Items.Add("Sve");
            cmbActive.Items.Add("Aktivne");
            cmbActive.Items.Add("Neaktivne");

            cmbPageSize.Items.Add("10");
            cmbPageSize.Items.Add("20");
            cmbPageSize.Items.Add("50");
            cmbPageSize.Items.Add("100");
            cmbPageSize.Items.Add("Sve");

            BrandBL brandBL = new BrandBL();

            cmbBrand.DataSource     = brandBL.GetBrands(true);
            cmbBrand.DataTextField  = "name";
            cmbBrand.DataValueField = "brandID";
            cmbBrand.DataBind();

            cmbPromotions.DataSource     = new PromotionBL().GetPromotions(true, null, null);
            cmbPromotions.DataTextField  = "name";
            cmbPromotions.DataValueField = "promotionID";
            cmbPromotions.DataBind();

            cmbPromotion.DataSource     = new PromotionBL().GetPromotions(true, null, null);
            cmbPromotion.DataTextField  = "name";
            cmbPromotion.DataValueField = "promotionID";
            cmbPromotion.DataBind();
        }
        // GET: api/Unit
        public ServerResponse Get()
        {
            var res = new ServerResponse();

            using (SupplierBL SupplierBL = new SupplierBL())
            {
                try
                {
                    res.Data = SupplierBL.GetSuppliers();
                }
                catch (Exception ex)
                {
                    res.Success = false;
                }
            }
            return(res);
        }
Example #4
0
        private void loadIntoForm()
        {
            CategoryBL categoryBL = new CategoryBL();

            //cmbCategory.DataSource = categoryBL.GetCategories();
            cmbCategory.DataSource     = categoryBL.GetNestedCategoriesDataTable(true, true);
            cmbCategory.DataTextField  = "name";
            cmbCategory.DataValueField = "categoryID";
            cmbCategory.DataBind();

            SupplierBL supplierBL = new SupplierBL();

            cmbSupplier.DataSource     = supplierBL.GetSuppliers(true);
            cmbSupplier.DataTextField  = "name";
            cmbSupplier.DataValueField = "supplierID";
            cmbSupplier.DataBind();


            cmbApproved.Items.Add("Sve");
            cmbApproved.Items.Add("Odobrene");
            cmbApproved.Items.Add("Neodobrene");


            cmbActive.Items.Add("Sve");
            cmbActive.Items.Add("Aktivne");
            cmbActive.Items.Add("Neaktivne");

            cmbPageSize.Items.Add("10");
            cmbPageSize.Items.Add("20");
            cmbPageSize.Items.Add("50");
            cmbPageSize.Items.Add("100");
            cmbPageSize.Items.Add("Sve");

            BrandBL brandBL = new BrandBL();

            cmbBrand.DataSource     = brandBL.GetBrands(true);
            cmbBrand.DataTextField  = "name";
            cmbBrand.DataValueField = "brandID";
            cmbBrand.DataBind();

            cmbPromotions.DataSource     = new PromotionBL().GetPromotions(true, null, null);
            cmbPromotions.DataTextField  = "name";
            cmbPromotions.DataValueField = "promotionID";
            cmbPromotions.DataBind();

            cmbPromotion.DataSource     = new PromotionBL().GetPromotions(true, null, null);
            cmbPromotion.DataTextField  = "name";
            cmbPromotion.DataValueField = "promotionID";
            cmbPromotion.DataBind();

            cmbAdditionallyCategory.DataSource     = categoryBL.GetNestedCategoriesDataTable(true, true);
            cmbAdditionallyCategory.DataTextField  = "name";
            cmbAdditionallyCategory.DataValueField = "categoryID";
            cmbAdditionallyCategory.DataBind();

            cmbSort.Items.Add(new ListItem("Nazivu", "brand.name, product.name"));
            cmbSort.Items.Add(new ListItem("Datumu unosa", "product.insertDate"));
            cmbSort.Items.Add(new ListItem("Datumu izmene", "product.updateDate"));
            cmbSort.Items.Add(new ListItem("Datum izmene opadajuće", "product.updateDate DESC"));
            cmbSort.Items.Add(new ListItem("Datum unosa opadajuće", "product.insertDate DESC"));

            cmbNewCategory.DataSource     = new CategoryBL().GetNestedCategoriesDataTable(true, true);
            cmbNewCategory.DataTextField  = "name";
            cmbNewCategory.DataValueField = "categoryID";
            cmbNewCategory.DataBind();

            cmbHasImage.Items.Add(new ListItem("Sve", "null"));
            cmbHasImage.Items.Add(new ListItem("Ima", "true"));
            cmbHasImage.Items.Add(new ListItem("Nema", "false"));

            cmbCustomPage.DataSource     = new CustomPageBL().GetCustomPages();
            cmbCustomPage.DataTextField  = "title";
            cmbCustomPage.DataValueField = "customPageID";
            cmbCustomPage.DataBind();
        }