Example #1
0
        private void loadIntoForm()
        {
            loadBrands();

            CategoryBL categoryBL = new CategoryBL();

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

            VatBL vatBL = new VatBL();

            cmbVat.DataSource     = vatBL.GetVats();
            cmbVat.DataValueField = "vatID";
            cmbVat.DataTextField  = "vatValue";
            cmbVat.DataBind();
            cmbVat.SelectedIndex = 3;

            loadSupplier();

            PromotionBL promotionBL = new PromotionBL();

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

            cmbUnitOfMeasure.DataSource     = new UnitOfMeasureBL().GetUnitsOfMeasure(true);
            cmbUnitOfMeasure.DataTextField  = "FullName";
            cmbUnitOfMeasure.DataValueField = "unitOfMeasureID";
            cmbUnitOfMeasure.SelectedValue  = "2";
            cmbUnitOfMeasure.DataBind();

            cmbCategories.DataSource     = categoryBL.GetNestedCategoriesDataTable();
            cmbCategories.DataTextField  = "name";
            cmbCategories.DataValueField = "categoryID";
            cmbCategories.DataBind();

            if (!bool.Parse(ConfigurationManager.AppSettings["productInMultipleCategories"]))
            {
                divProductInMultipleCategories.Visible = false;
            }
            else
            {
                btnAddProductToCategory.Enabled = cmbCategory.SelectedIndex > 0 ? true : false;
            }
        }
Example #2
0
        private void loadCategories()
        {
            CategoryBL categoryBL = new CategoryBL();

            dgvCategory.DataSource = categoryBL.GetNestedCategoriesDataTable(true);
            dgvCategory.DataBind();
        }
Example #3
0
        private void loadCategories()
        {
            CategoryBL categoryBL = new CategoryBL();

            cmbCategory.DataSource     = categoryBL.GetNestedCategoriesDataTable();
            cmbCategory.DataTextField  = "name";
            cmbCategory.DataValueField = "categoryID";
            cmbCategory.DataBind();
        }
Example #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (User.Identity.IsAuthenticated && User.IsInRole("administrator"))
     {
         CategoryBL categoryBL = new CategoryBL();
         dgvCategory.DataSource = categoryBL.GetNestedCategoriesDataTable();
         dgvCategory.DataBind();
     }
     else
     {
         Page.Response.Redirect("/administrator/login.aspx?returnUrl=" + Page.Request.RawUrl.Substring(15, Page.Request.RawUrl.Length - 15));
     }
 }
Example #5
0
        private void loadIntoForm()
        {
            CategoryBL categoryBl = new CategoryBL();

            cmbParent.DataSource     = categoryBl.GetNestedCategoriesDataTable(true, true);
            cmbParent.DataTextField  = "name";
            cmbParent.DataValueField = "categoryID";
            cmbParent.DataBind();

            AttributeBL attributeBL = new AttributeBL();

            cmbAttribute.DataSource     = attributeBL.GetAllAttributes();
            cmbAttribute.DataTextField  = "name";
            cmbAttribute.DataValueField = "attributeID";
            cmbAttribute.DataBind();

            cmbCriterion.Items.Add("Novi");
            cmbCriterion.Items.Add("Ceni");
            cmbCriterion.Items.Add("Slučajni");

            txtPricePercent.Text    = "0,00";
            txtWebPricePercent.Text = "0,00";

            cmbSlider.DataSource     = new SliderBL().GetSliders(true);
            cmbSlider.DataTextField  = "name";
            cmbSlider.DataValueField = "sliderID";
            cmbSlider.DataBind();

            cmbCategoryBanner.DataSource     = new CategoryBannerBL().GetCategoryBanners(true);
            cmbCategoryBanner.DataValueField = "categoryBannerID";
            cmbCategoryBanner.DataTextField  = "name";
            cmbCategoryBanner.DataBind();

            cmbExtraMenu.DataSource     = new CategoryExtraMenuBL().GetCategoryExtraMenus(true);
            cmbExtraMenu.DataTextField  = "name";
            cmbExtraMenu.DataValueField = "categoryExtraMenuID";
            cmbExtraMenu.DataBind();

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

            chkUpdateProductsFromExternalApplication.Visible = bool.Parse(ConfigurationManager.AppSettings["updateProductsFromExternalApplication"]);
            chkExportProducts.Visible = bool.Parse(ConfigurationManager.AppSettings["exportProducts"]);

            cmbCategoryBrand.DataSource     = new BrandBL().GetBrands(false);
            cmbCategoryBrand.DataTextField  = "name";
            cmbCategoryBrand.DataValueField = "brandID";
            cmbCategoryBrand.DataBind();
        }
Example #6
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();
        }
Example #7
0
        private void loadIntoForm()
        {
            EweBL eweBL = new EweBL();

            cmbEweCategory.DataSource     = eweBL.GetEweCategories(null, null);
            cmbEweCategory.DataValueField = "eweCategoryID";
            cmbEweCategory.DataTextField  = "name";
            cmbEweCategory.DataBind();

            CategoryBL categoryBL = new CategoryBL();

            //cmbCategory.DataSource = categoryBL.GetCategories("sortOrder", false);
            cmbCategory.DataSource     = categoryBL.GetNestedCategoriesDataTable();
            cmbCategory.DataTextField  = "name";
            cmbCategory.DataValueField = "categoryID";
            cmbCategory.DataBind();
        }
Example #8
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();
        }