private void populateProviders() { //get all approved providers IList <ApprovedProvider> oApprovedProviders; ApprovedProviderDataAccess oApprovedProviderDataAccess = new ApprovedProviderDataAccess(); int totalCount = 0; oApprovedProviders = oApprovedProviderDataAccess.GetPagedApprovedProviderSearch("1=1", 0, Int16.MaxValue, "Status, OrganizationName", "asc", ref totalCount); foreach (ApprovedProvider ap in oApprovedProviders) { try { string orgName = ap.OrganizationName; string orgStatus = ap.Status; if (orgName.Length > 50) { orgName = orgName.Substring(0, 47) + "..."; } if (orgStatus != "Active") { orgName = orgStatus + " - " + orgName; } lbEducationProvider.Items.Add(new ListItem(orgName, ap.ID.ToString())); } catch (Exception ex) { Response.Write(ex.Message); Response.End(); } } }
/// <summary> /// Populate all approved providers /// </summary> private void populateProviders() { //get all approved providers IList <ApprovedProvider> oApprovedProviders; ApprovedProviderDataAccess oApprovedProviderDataAccess = new ApprovedProviderDataAccess(); int totalCount = 0; oApprovedProviders = oApprovedProviderDataAccess.GetPagedApprovedProviderSearch("tblApprovedProvider.Status = 'Active'", 0, Int16.MaxValue, "OrganizationName", "asc", ref totalCount); foreach (ApprovedProvider ap in oApprovedProviders) { string orgName = ap.OrganizationName; if (orgName.Length > 35) { orgName = orgName.Substring(0, 32) + "..."; } lbEducationProvider.Items.Add(new ListItem(orgName, ap.ID.ToString())); } }
/// <summary> /// Page Load event handler /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { int iPageIndex = 0; int totalCount = 0; ApprovedProviderDataAccess oblProvDAL = new ApprovedProviderDataAccess(); ////if no search keywords for approved provider found in the session then redirect to the FindProviders.aspx page //if (Session[LACESConstant.SessionKeys.SEARCH_APPROVED_PROVIDERS_KEYWORDS] == null) //{ // Response.Redirect("FindApprovedProviders.aspx"); //} lblMessage.Visible = false; ///Check Sort Column Query String if (Request.QueryString[LACESConstant.QueryString.SORT_COLUMN] != null) { sSortColumn = Request.QueryString[LACESConstant.QueryString.SORT_COLUMN].ToString(); } else { sSortColumn = "OrganizationName"; } ///Check Sort Order Query String if (Request.QueryString[LACESConstant.QueryString.SORT_ORDER] != null) { sSortOrder = Request.QueryString[LACESConstant.QueryString.SORT_ORDER].ToString(); } else { sSortOrder = "asc"; } ///Check Current Page Index Query String if (Request.QueryString[LACESConstant.QueryString.PAGE_INDEX] != null) { iPageIndex = Convert.ToInt32(Request.QueryString[LACESConstant.QueryString.PAGE_INDEX].ToString()); } else { iPageIndex = 0; } //Create Header row //createHeaderRow(sSortColumn, sSortOrder,iPageIndex); //Adjust left/right content place holder width IncreaseLeftContentWidth(); providers = oblProvDAL.GetPagedApprovedProviderSearch(buildSearchCriteria(), iPageIndex, LACESConstant.SEARCH_RESULT_PAGE_SIZE, sSortColumn, sSortOrder, ref totalCount); string resultsNumber = ""; if (iPageIndex == 0) { resultsNumber = "1 -"; } else { resultsNumber = ((iPageIndex * 10) + 1).ToString() + " - "; } int pageMax = ((iPageIndex + 1) * LACESConstant.SEARCH_RESULT_PAGE_SIZE); if (pageMax <= totalCount) { resultsNumber += ((iPageIndex + 1) * 10).ToString(); } else { resultsNumber += totalCount.ToString(); } uiLitResultsMessage.Text = "Search Results: " + resultsNumber + " out of " + totalCount.ToString() + " results"; //Show selecterd criteria in right side //showSelectedCriteria(totalCount); //Generate PreviousPage NextPage link setPreviousNextPage(iPageIndex, totalCount); }
/// <summary> /// Page Load Event to load input fields initially /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { HtmlMeta htmlGoogleMeta = new HtmlMeta(); htmlGoogleMeta.Attributes.Add("name", "google-site-verification"); htmlGoogleMeta.Attributes.Add("content", "K6O__N94_Ynv_-1cyXov5nLAP0Hej6PqelOB22oi4kY"); Header.Controls.Add(htmlGoogleMeta); //redirect users to their respective section home page //RedirectToSectionSpecificDefaultPage(); uiLnkApplicationForm.HRef = GetPDFURL(LACESUtilities.GetApplicationConstants("ApplicationFormPDF")); checkLoggedInProvider(); //change the footer image path // Master.ChangeFooterImagePath = ""; //set the approved provider link string appString = "ApprovedProviderGuidelines.aspx"; if (appString != "") { approvedProLink.Attributes["href"] = appString; } if (!IsPostBack) { //get all approved providers IList <ApprovedProvider> oApprovedProviders; ApprovedProviderDataAccess oApprovedProviderDataAccess = new ApprovedProviderDataAccess(); int totalCount = 0; oApprovedProviders = oApprovedProviderDataAccess.GetPagedApprovedProviderSearch("tblApprovedProvider.Status = 'Active'", 0, Int16.MaxValue, "OrganizationName", "asc", ref totalCount); foreach (ApprovedProvider ap in oApprovedProviders) { string orgName = ap.OrganizationName; if (orgName.Length > 48) { orgName = orgName.Substring(0, 45) + "..."; } lbEducationProvider.Items.Add(new ListItem(orgName, ap.ID.ToString())); } //Populate Subject Dropdown List populateSubjectList(); //Populate State Dropdown List populateStateList(); populateSlideshow(); ///If Reached this page form Course Search Result page by clicking search again ///And having criteria into the session then load existing selection value at the visitor section if (Request.QueryString["SearchAgain"] != null && Session[LACESConstant.SessionKeys.SEARCH_VISITOR_CRITERIA] != null) { ///Get Search criteria from session SearchCourse objSearchCriteria = (SearchCourse)Session[LACESConstant.SessionKeys.SEARCH_VISITOR_CRITERIA]; if (objSearchCriteria != null) { loadExistingSelection(objSearchCriteria); } } ///Focus to the first input control txtKeyword.Focus(); } //txtKeyword.Attributes.Add("onclick", "javascript:RemoveDefaultText(this,'Search Here');"); //chkDistanceEdu.Attributes.Add("onclick", "initializeLocation(this)"); //ddlLocation.Attributes.Add("onchange", "uncheckDistanceEducation(this)"); }