private void BindAutoDepositeAccount(int ClientType) { try { if (ClientType == 0) { ddlAccountNo.Items.Clear(); ddlAccountNo.Items.Insert(0, new ListItem("Select Account", "0")); return; } ddlAccountNo.Items.Clear(); BAClients objBAClients = new BAClients(); DataSet ObjDsClients = _objBOUtiltiy.GetAccNoofClientandSuppl(ClientType, ddlAccType.SelectedItem.Text); if (ObjDsClients.Tables[0].Rows.Count > 0) { ddlAccountNo.DataSource = ObjDsClients; ddlAccountNo.DataValueField = "id"; ddlAccountNo.DataTextField = "accountcode"; ddlAccountNo.DataBind(); ddlAccountNo.Items.Insert(0, new ListItem("Select Account Code", "0")); } else { ddlAccountNo.Items.Insert(0, new ListItem("Select Account Code", "0")); } } catch (Exception ex) { lblMsg.Text = _objBOUtiltiy.ShowMessage("danger", "error", ex.Message); } }