Good day,
I am stuck at his moment figuring how could i solve this porblem.. I created a method that will retreive a value from the dbase and place it in the dropdownlist.. so here is my code

 protected void ddlSalesOrg_SelectedIndexChanged(object sender, EventArgs e)
        {
            _lkpPlantEntities.plant = ddlPlant.SelectedValue;
            _lkpCustomerEntities.txtSalesOrg = ddlSalesOrg.SelectedValue;
            ddlSalesOffice.DataSource = _tradeDealsBll.GetSalesOfficeBLL(_lkpCustomerEntities);
            ddlSalesOffice.DataValueField = "txtSalesOffice";
            ddlSalesOffice.DataTextField = "txtSalesOffice";
            ddlSalesOffice.DataBind();
        }

at the 3rd line of my code is filter.. //_lkpPlantEntities.plant = ddlPlant.SelectedValue;
for plant
while the 4th line is a filter again.. //_lkpCustomerEntities.txtSalesOrg = ddlSalesOrg.SelectedValue;
for sales org

meaning the first filter which is plant is part of the plantEntities or plant class
and the salesorg is part of the CustomerEntities or Customer class

i passed the value of my GetSalesOfficeBLL(_lkpCustomerEntities); to my BLL
so here is my code for that

  public DataTable GetSalesOfficeBLL(LKPCustomerEntities _lkpCustomerEntities)
        {
            return base.GetSalesOfficeDAL(_lkpCustomerEntities);

        }

after that this method pass in my DAL GetSalesOfficeDAL(_lkpCustomerEntities);

so here is my code for that

protected DataTable GetSalesOfficeDAL(LKPCustomerEntities _lkpCustomerEntities)
        {
            return base.FillDataTable("spGet_SalesOffice", _lkpCustomerEntities);
        }

my Stored proc seems to be okey. coz it is running.

here is my SP..

--my parameters
@plant varchar(4)
    ,@txtSalesOrg nvarchar(10)

    SELECT  DISTINCT CUSTOMER.TXTSALESORG,CUSTOMER.TXTSALESOFFICE
            --CUSTOMER.TXTDELLOC 
            ,PLANT.PLANT
            ,Customer.txtCity
            FROM PHSROD20.C1DB.DBO.LKPCUSTOMER CUSTOMER
            INNER JOIN PHSROD20.C1DB.DBO.LKPSAPPLANT PLANT
            ON CUSTOMER.TXTDELLOC = PLANT.PLANT
        WHERE           PLANT.plant = @plant 
                and     CUSTOMER.txtsalesorg = @txtSalesOrg

my problem is that there's an error for the filter plant which is
Object reference not set to an instance of an object.

i know that the sol. here is overloading.. can somebody tell me how should i overloadclasses..
or can someone give me a link on s much simpler lesson for overloading. or polymorphism..

thanks..

thanks i already solve the issue.. i just add it in the property

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.