private void PopulateBookStatusDropDown(string Status) //Added for NCIDC related modifications { ddlBookStatus.Items.Clear(); ddlBookStatus.Items.Add(new ListItem("[Select a value]", "")); bool IsBookStatusAssigned = false; BookstatusCollection bookStatusColl = PE_DAL.GetAllBookstatus(true); foreach (Bookstatus currbookStatus in bookStatusColl) { ListItem li = new ListItem(); li.Value = currbookStatus.BookstatusID.ToString(); li.Text = currbookStatus.BookstatusName; if (Status.Length > 0 && string.Compare(Status, li.Text.Trim(), true) == 0) { li.Selected = true; IsBookStatusAssigned = true; } ddlBookStatus.Items.Add(li); li = null; } if (!IsBookStatusAssigned) { ddlBookStatus.SelectedValue = ""; } }
protected void BindOptions() { this.listLang.DataSource = PE_DAL.GetAllLang(true); this.listLang.DataTextField = "name"; this.listLang.DataValueField = "id"; this.listLang.DataBind(); this.listAudience.DataSource = PE_DAL.GetAllAudience(true); this.listAudience.DataTextField = "name"; this.listAudience.DataValueField = "id"; this.listAudience.DataBind(); this.listCancerType.DataSource = PE_DAL.GetAllCancerType(true); this.listCancerType.DataTextField = "name"; this.listCancerType.DataValueField = "id"; this.listCancerType.DataBind(); this.listProdFormat.DataSource = PE_DAL.GetAllProdFormat(true); this.listProdFormat.DataTextField = "name"; this.listProdFormat.DataValueField = "id"; this.listProdFormat.DataBind(); this.listReadingLevel.DataSource = PE_DAL.GetAllReadinglevel(true); this.listReadingLevel.DataTextField = "name"; this.listReadingLevel.DataValueField = "id"; this.listReadingLevel.DataBind(); this.listSeries.DataSource = PE_DAL.GetAllSeries(true); this.listSeries.DataTextField = "name"; this.listSeries.DataValueField = "id"; this.listSeries.DataBind(); this.listRace.DataSource = PE_DAL.GetAllRace(true); this.listRace.DataTextField = "name"; this.listRace.DataValueField = "id"; this.listRace.DataBind(); this.listBookStatus.DataSource = PE_DAL.GetAllBookstatus(true); this.listBookStatus.DataTextField = "name"; this.listBookStatus.DataValueField = "id"; this.listBookStatus.DataBind(); this.listSubject.DataSource = PE_DAL.GetAllSubject(true); this.listSubject.DataTextField = "name"; this.listSubject.DataValueField = "id"; this.listSubject.DataBind(); this.listROOSubject.DataSource = PE_DAL.GetAllROOUsedSubject(); this.listROOSubject.DataTextField = "name"; this.listROOSubject.DataValueField = "id"; this.listROOSubject.DataBind(); this.listAward.DataSource = PE_DAL.GetAllAward(true); this.listAward.DataTextField = "name"; this.listAward.DataValueField = "id"; this.listAward.DataBind(); //this.listtestcancertype.DataSource = State.GetStates(); //this.listtestcancertype.DataTextField = "StateName"; //this.listtestcancertype.DataValueField = "StateAbbr"; //this.listtestcancertype.DataBind(); //this.rdbtnListYesNoMCL.DataBind(); this.listOwner.DataSource = PE_DAL.GetAllOwners(true); this.listOwner.DataTextField = "name"; this.listOwner.DataValueField = "id"; this.listOwner.DataBind(); this.listSponsor.DataSource = PE_DAL.GetAllSponsors(true); this.listSponsor.DataTextField = "name"; this.listSponsor.DataValueField = "id"; this.listSponsor.DataBind(); }