Пример #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        try
        {
            if (this.lblErrorMessage.Text.Length != 0)
            {
                this.lblErrorMessage.Text = "";
            }

            ProductSubCategoryInfoDTO dto = populate();

            Facade facade = Facade.GetInstance();
            IProductSubCategoryInfoBL oCategoryBL = facade.createProductSubCategoryBL();
            oCategoryBL.addNewProductSubCategory(dto);

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

            this.GridView1.DataBind();


            this.txtHideFieldPK.Value             = "";
            this.txtPSCCode.Text                  = "";
            this.txtPSubCategoryDescription.Text  = "";
            this.ddlProductCategory.SelectedValue = "";
            this.btnSave.Text = "Save";
        }
        catch (Exception Exp)
        {
            lblErrorMessage.Text = cls.ErrorString(Exp);
        }
    }
Пример #2
0
    private void DropDownListProductSubCategory(Facade facade)
    {
        IProductSubCategoryInfoBL        ProductSubCategoryList = facade.createProductSubCategoryBL();
        List <ProductSubCategoryInfoDTO> oProSubCategoryList    = ProductSubCategoryList.showDataSubCategoryInfo();

        int i = 0;

        DDLSubCategory.Items.Clear();
        DDLSubCategory.Items.Add("(Select Product Sub Category Name)");
        this.DDLSubCategory.Items[i].Value = "00000000-0000-0000-0000-000000000000";
        foreach (ProductSubCategoryInfoDTO newDto in oProSubCategoryList)
        {
            i++;
            this.DDLSubCategory.Items.Add(newDto.PSC_Description);
            this.DDLSubCategory.Items[i].Value = newDto.PrimaryKey.ToString();
        }
    }
Пример #3
0
    private void DropDownListSubCategory(Facade facade)
    {
        IProductSubCategoryInfoBL        subCategoryList  = facade.createProductSubCategoryBL();
        List <ProductSubCategoryInfoDTO> oSubCategoryList = subCategoryList.showDataSubCategoryInfo();

        int i = 0;

        ddlProductSubCategory.Items.Clear();
        ddlProductSubCategory.Items.Add("(Select any sub category)");
        this.ddlProductSubCategory.Items[i].Value = "";
        foreach (ProductSubCategoryInfoDTO newDto in oSubCategoryList)
        {
            i++;
            this.ddlProductSubCategory.Items.Add(newDto.PSC_Description);
            this.ddlProductSubCategory.Items[i].Value = newDto.PrimaryKey.ToString();
        }
    }
Пример #4
0
    protected void btnClickProductCategory_Click(object sender, EventArgs e)
    {
        try
        {
            if (this.ddlProductCategory.SelectedValue == "")
            {
                return;
            }

            ProductInfoDTO pddlDTO = DDLPopulate();

            Facade facade = Facade.GetInstance();

            IProductSubCategoryInfoBL        subCategoryList = facade.createProductSubCategoryBL();
            List <ProductSubCategoryInfoDTO> oArrayList      = subCategoryList.showDataSubCategoryInfoByPC(pddlDTO.PC_PrimaryKey);

            int i = 0;
            ddlProductSubCategory.Items.Clear();
            ddlProductSubCategory.Items.Add("(Select any sub category)");
            this.ddlProductSubCategory.Items[i].Value = "";
            foreach (ProductSubCategoryInfoDTO newDto in oArrayList)
            {
                i++;
                this.ddlProductSubCategory.Items.Add(newDto.PSC_Description);
                this.ddlProductSubCategory.Items[i].Value = newDto.PrimaryKey.ToString();
            }
        }
        catch (Exception exp)
        {
            lblErrorMessage.Text = cls.ErrorString(exp);
        }
        finally
        {
            ScriptManager1.SetFocus(ddlProductSubCategory);
        }
    }