protected override void Page_Load(object sender, EventArgs e) { base.Page_Load(sender, e); if (!Page.IsPostBack) { // data bind search options UserController uc = new UserController(); DataTable dt = uc.GetSearchIdentifiers(); SearchOptionsDropdown.DataSource = dt; SearchOptionsDropdown.DataBind(); string encPatientId = Request.QueryString["epid"]; if (!string.IsNullOrEmpty(encPatientId)) { EncPatientId.Value = encPatientId; } if (!string.IsNullOrEmpty(EncPatientId.Value)) { string pid = Security.CustomCryptoHelper.Decrypt(EncPatientId.Value); if (!string.IsNullOrEmpty(pid)) { int patientId = int.Parse(pid); EditPatient(patientId); } } if (!string.IsNullOrEmpty(QuerySearch)) { PatientSearch.TextValue = QuerySearch; DoSearch(sender, e); } } }
/// <summary> /// Builds a List of Identifiers based on user /// </summary> private void BuildIdentifiersDropDown() { UserController uc = new UserController(); DataTable dt = uc.GetSearchIdentifiers(); SearchOptionsDropdown.DataSource = dt; SearchOptionsDropdown.DataBind(); }