public void bindcus()
{
ddlcustomer.Items.Clear();
ddlcustomer.Items.Add(new ListItem("--SELECT--","0"));
ddlcustomer.AppendDataBoundItems = true;
dao.type = "CUSTOMER";
DataTable dt= new DataTable();
dt = bl.report(dao);
if (dt.Rows.Count > 0)
{
ddlcustomer.DataSource = dt;
ddlcustomer.DataTextField = "name";
ddlcustomer.DataValueField = "code";
ddlcustomer.DataBind();
}
}
{
ddlcustomer.Items.Clear();
ddlcustomer.Items.Add(new ListItem("--SELECT--","0"));
ddlcustomer.AppendDataBoundItems = true;
dao.type = "CUSTOMER";
DataTable dt= new DataTable();
dt = bl.report(dao);
if (dt.Rows.Count > 0)
{
ddlcustomer.DataSource = dt;
ddlcustomer.DataTextField = "name";
ddlcustomer.DataValueField = "code";
ddlcustomer.DataBind();
}
}
Post a Comment (0)