public void LoadDocName() { try { Session["DocSearchDocNameList"] = BLLDocument.GetDocumentNameList(null, null, null); this.drpDocName.DataSource = (List <ATTDocument>)Session["DocSearchDocNameList"]; this.drpDocName.DataTextField = "DocumentName"; this.drpDocName.DataValueField = "DocID"; this.drpDocName.DataBind(); ListItem a = new ListItem(); a.Selected = true; a.Text = "Select Document"; a.Value = "0"; drpDocName.Items.Insert(0, a); } catch (Exception ex) { this.lblStatus.Text = ex.Message; } }
public void LoadOrganisation() { try { Session["DocSearchOrgList"] = BLLOrganization.GetOrganizationNameList(); this.drpOrganisation.DataSource = (List <ATTOrganization>)Session["DocSearchOrgList"]; this.drpOrganisation.DataTextField = "OrgName"; this.drpOrganisation.DataValueField = "OrgId"; this.drpOrganisation.DataBind(); ListItem a = new ListItem(); a.Selected = true; a.Text = "Select Organisation"; a.Value = "0"; drpOrganisation.Items.Insert(0, a); Session["DocSearchUnitList"] = BLLOrganizationUnit.GetOrganizationUnits(null, null); Session["DocSearchDocNameList"] = BLLDocument.GetDocumentNameList(null, null, null); } catch (Exception ex) { lblStatus.Text = ex.Message; } }