Ejemplo n.º 1
0
        private void loadIntoForm()
        {
            loadBrands();

            CategoryBL categoryBL = new CategoryBL();

            cmbCategory.DataSource     = categoryBL.GetCategories();
            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();
        }
Ejemplo n.º 2
0
        private void loadPromotions()
        {
            PromotionBL promotionBL = new PromotionBL();

            dgvPromotions.DataSource = promotionBL.GetPromotions(false, null, null);
            dgvPromotions.DataBind();
        }
Ejemplo n.º 3
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;
            }
        }
Ejemplo n.º 4
0
        private void loadPromotions()
        {
            PromotionBL promotionBL = new PromotionBL();

            //ProductBL productBL = new ProductBL();

            rptPromotions.DataSource = promotionBL.GetPromotions(false, true, null);
            rptPromotions.DataBind();

            //productSlider.NumberOfProducts = 4;
            //ProductBL productBL = new ProductBL();
            //productSlider.Products = productBL.GetProductsForFirstPage(3, 8, "product.name");

            //productSlider1.NumberOfProducts = 4;
            //productSlider1.Products = productBL.GetProductsForFirstPage(3, 8, "product.name");
        }