Beispiel #1
0
    protected void BindSupplier()
    {
        DataTable dt = BLL_POLOG_Register.POLOG_Get_Supplier(ddlSupplierType.SelectedValue);

        if (dt.Rows.Count > 0)
        {
            ddlSupplier.DataSource     = dt;
            ddlSupplier.DataTextField  = "Supplier_Name";
            ddlSupplier.DataValueField = "Supplier_Code";
            ddlSupplier.DataBind();
            ddlSupplier.Items.Insert(0, new ListItem("-All-", "0"));
        }
        else
        {
            ddlSupplier.DataSource     = dt;
            ddlSupplier.DataTextField  = "Supplier_Name";
            ddlSupplier.DataValueField = "Supplier_Code";
            ddlSupplier.DataBind();
            ddlSupplier.Items.Insert(0, new ListItem("-All-", "0"));
        }
    }