private IList <DistanceDTO> GetGroupData(string entityType, string groupId, string orderBy, bool sortAsc, int count, IList <string> selections) { // Group Query switch (entityType.ToUpper()) { case "IACCOUNT": { return(DistanceSearchHelper.AccountGroupSearch( groupId, orderBy, sortAsc, count, 0, selections)); } case "ICONTACT": { return(DistanceSearchHelper.ContactGroupSearch( groupId, orderBy, sortAsc, count, 0, selections)); } default: return(null); } }
/// <summary> /// Execute the distance search and create the result set. /// </summary> public IList <DistanceDTO> ExecShowMap() { if (!ValidateInputs()) { //Show Error return(null); } IList <DistanceDTO> results = null; // Perform the search on either account or contact if (rbAccts.Checked) { // Account Group Search results = DistanceSearchHelper.AccountGroupSearch(cbxGroupName.SelectedValue, Page.Session["m_sortExpression"].ToString(), ((SortDirection)Page.Session["m_sortDirection"] == SortDirection.Ascending), 0, 0, null); } else { // Contact Group Search results = DistanceSearchHelper.ContactGroupSearch(cbxGroupName.SelectedValue, Page.Session["m_sortExpression"].ToString(), ((SortDirection)Page.Session["m_sortDirection"] == SortDirection.Ascending), 0, 0, null); } dgPostalCodeResults.DataSource = null; dgPostalCodeResults.DataSource = results; //Display datagrid. dgPostalCodeResults.DataBind(); return(results); }