private void DropDownListProduct(Facade facade)
    {
        IProductInfoBL        oIProductInfoBL = facade.GetProductInfoInstance();
        List <ProductInfoDTO> oCategoryList   = oIProductInfoBL.GetProductInfo();

        int i = 0;

        ddlProductName.Items.Clear();
        ddlProductName.Items.Add("(Select any product)");
        this.ddlProductName.Items[i].Value = "";
        foreach (ProductInfoDTO newDto in oCategoryList)
        {
            i++;
            this.ddlProductName.Items.Add(newDto.P_Name);
            this.ddlProductName.Items[i].Value = newDto.PrimaryKey.ToString();
        }
    }
Esempio n. 2
0
    private void DropDownListProductName(Facade facade)
    {
        IProductInfoBL        ProductInfoList = facade.GetPBLImp();
        List <ProductInfoDTO> oProInfoList    = ProductInfoList.GetProductInfo();

        int i = 0;

        DDLProductName.Items.Clear();
        DDLProductName.Items.Add("(Select Product Name)");
        this.DDLProductName.Items[i].Value = "00000000-0000-0000-0000-000000000000";
        foreach (ProductInfoDTO newDto in oProInfoList)
        {
            i++;
            this.DDLProductName.Items.Add(newDto.P_Name);
            this.DDLProductName.Items[i].Value = newDto.PrimaryKey.ToString();
        }
    }
Esempio n. 3
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            if (this.lblErrorMessage.Text.Length != 0)
            {
                this.lblErrorMessage.Text = "";
            }

            ProductInfoDTO pDTO = Populate();

            IProductInfoBL facade = Facade.GetInstance().GetPBLImp();
            facade.AddProductInfo(pDTO);

            this.lblErrorMessage.Text = "Data Save Successfully.";

            this.hfPrimaryKey.Value  = "";
            this.txtProductCode.Text = "";
            this.ddlProductCategory.SelectedValue    = "";
            this.ddlProductSubCategory.SelectedValue = "";
            this.ddlProductBrand.SelectedValue       = "";
            this.ddlProductUnit.SelectedValue        = "";
            this.txtProductName.Text    = "";
            this.txtStyle.Text          = "";
            this.txtSalesPrice.Text     = "";
            this.txtSalesPriceDate.Text = "";
            this.txtVat.Text            = "";
            this.txtTax.Text            = "";
            this.txtMaxLevel.Text       = "";
            this.txtMinLevel.Text       = "";
            this.txtCostPrice.Text      = "";
            this.txtCostPriceDate.Text  = "";
            this.txtDiscount.Text       = "";
            this.txtReorderLevel.Text   = "";
            this.txtWarrantyMonth.Text  = "";
            this.chkWarranty.Checked    = false;
            this.chkStatus.Checked      = false;
            this.btnSave.Text           = "Save";
            GridView1.DataBind();
        }
        catch (Exception Exp)
        {
            lblErrorMessage.Text = cls.ErrorString(Exp);
        }
    }