public void fillDLLs() { DataTable dtCityShowAll = cityBLLObj.BLLShowAllCity(); ddlCity.DataSource = dtCityShowAll; ddlCity.DataTextField = "cityName"; ddlCity.DataValueField = "cityId"; ddlCity.DataBind(); ddlCity.Items.Add("---Select---"); ddlCity.SelectedIndex = ddlCity.Items.Count - 1; ddlCity.Items[ddlCity.Items.Count - 1].Value = ""; DataTable dtStateShowAll = stateBLLObj.BLLStateShowAll(); ddlState.DataSource = dtStateShowAll; ddlState.DataTextField = "stateName"; ddlState.DataValueField = "stateId"; ddlState.DataBind(); ddlState.Items.Add("---Select---"); ddlState.SelectedIndex = ddlState.Items.Count - 1; ddlState.Items[ddlState.Items.Count - 1].Value = ""; DataTable dtCategory = categoryBLLObj.BLLGetAllCategory(); ddlSelectCategory.DataSource = dtCategory; ddlSelectCategory.DataTextField = "categoryName"; ddlSelectCategory.DataValueField = "categoryId"; ddlSelectCategory.DataBind(); ddlSelectCategory.Items.Add("---Select---"); ddlSelectCategory.SelectedIndex = ddlSelectCategory.Items.Count - 1; ddlSelectCategory.Items[ddlSelectCategory.Items.Count - 1].Value = ""; DataTable dtAdvertiseSelect = advBLLObj.BLLAdvertiseShowAll(); ddlAdvId.DataSource = dtAdvertiseSelect; ddlAdvId.DataTextField = "maxId"; ddlAdvId.DataBind(); ddlAdvId.Items.Add("---Select---"); ddlAdvId.SelectedIndex = ddlAdvId.Items.Count - 1; ddlAdvId.Items[ddlAdvId.Items.Count - 1].Value = ""; DataTable dtAdvertiseLocation = pubAdvBLLObj.BLLAdvertiseLocation(); ddlLocation.DataSource = dtAdvertiseLocation; ddlLocation.DataTextField = "LocationName"; ddlLocation.DataValueField = "LocId"; ddlLocation.DataBind(); ddlLocation.Items.Add("---Select---"); ddlLocation.SelectedIndex = ddlLocation.Items.Count - 1; ddlLocation.Items[ddlLocation.Items.Count - 1].Value = ""; }
//Populate the Grid with State Details private void ShowAllState() { try { DataTable dtStateShowAll = stateBLLObj.BLLStateShowAll(); gvState.DataSource = dtStateShowAll; gvState.DataBind(); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dtStateShowAll = stateBLLObj.BLLStateShowAll(); DropDownList1.DataSource = dtStateShowAll; DropDownList1.DataTextField = "stateName"; DropDownList1.DataValueField = "stateId"; DropDownList1.DataBind(); DropDownList1.Items.Add("---Select---"); DropDownList1.SelectedIndex = DropDownList1.Items.Count - 1; DropDownList1.Items[DropDownList1.Items.Count - 1].Value = ""; } }
private void FillDDLState() { try { DataTable dtStateShowAll = stateBLLObj.BLLStateShowAll(); ddlState.DataSource = dtStateShowAll; ddlState.DataTextField = "stateName"; ddlState.DataValueField = "stateId"; ddlState.DataBind(); ddlState.Items.Add("---Select---"); ddlState.SelectedIndex = ddlState.Items.Count - 1; ddlState.Items[ddlState.Items.Count - 1].Value = ""; } catch (Exception ex) { string msg = ex.Message; } }
private void LoadPlace() { try { // DataTable dtStateShowAll = stateBLLObj.BLLStateHCShowAll(); DataTable dtStateShowAll = stateBLLObj.BLLStateShowAll(); cmbState.DataSource = dtStateShowAll; cmbState.DataTextField = "stateName"; cmbState.DataValueField = "stateId"; cmbState.DataBind(); cmbState.Items.Add("---Select---"); cmbState.SelectedIndex = cmbState.Items.Count - 1; cmbState.Items[cmbState.Items.Count - 1].Value = ""; } catch (Exception ex) { throw ex; } }