protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["company"] != null) { string company = Request.QueryString["company"]; ConciergeSampleBase demoToRun = new SearchUsingMSQL(); var result = demoToRun.GetComDetails(company); // and run it if (result != null) { this.lblName.Text = result.SearchResult.Table.Rows[0]["Name"].ToString(); this.imgCompany.ImageUrl = "https://www.iwla.com/assets/1/23/" + result.SearchResult.Table.Rows[0]["Image.Name"].ToString(); this.lblContactName.Text = result.SearchResult.Table.Rows[0]["PrimaryContactName__RightSide__rt"].ToString(); this.lblAddress1.Text = result.SearchResult.Table.Rows[0]["_Preferred_Address_Line1"].ToString(); this.lblAddress2.Text = result.SearchResult.Table.Rows[0]["_Preferred_Address_Line2"].ToString(); this.lblPhone.Text = result.SearchResult.Table.Rows[0]["_Preferred_PhoneNumber"].ToString(); this.lblCityStateZip.Text = result.SearchResult.Table.Rows[0]["_Preferred_Address_City"].ToString() + ", " + result.SearchResult.Table.Rows[0]["_Preferred_Address_State"].ToString() + " " + result.SearchResult.Table.Rows[0]["_Preferred_Address_PostalCode"].ToString(); this.lnkWebSite.NavigateUrl = result.SearchResult.Table.Rows[0]["Website"].ToString(); this.lnkWebSite.Text = result.SearchResult.Table.Rows[0]["Website"].ToString(); ContentIframe.Attributes["src"] = result.SearchResult.Table.Rows[0]["Youtube__c"].ToString().Replace("https://www.youtube.com/watch?v=", "https://www.youtube.com/embed/"); this.ltNote.Text = result.SearchResult.Table.Rows[0]["CompanyInfo__c"].ToString(); } } } }
private void GetPartnersPageWise(int searchIndex, int pageIndex, int pageSize) { string zip = null; string cityState = null; string company = null; int miles = -1; List <string> searchParams = new List <string>(); if (Session["paramshw"] != null) { searchParams = (List <string>)Session["paramshw"]; } if (Session["mileshw"] != null) { miles = Convert.ToInt32(Session["mileshw"]); } List <string> searchCertifcs = new List <string>(); if (Session["certshw"] != null) { searchCertifcs = (List <string>)Session["certshw"]; } if (Session["ziphw"] != null) { zip = (string)Session["ziphw"]; } if (Session["cityStatehw"] != null) { cityState = (string)Session["cityStatehw"]; } if (Session["companyhw"] != null) { company = (string)Session["companyhw"]; } ConciergeSampleBase demoToRun = new SearchUsingMSQL(); var result = demoToRun.RunHD(zip, cityState, company, searchParams, searchCertifcs, miles, searchIndex, pageSize); // and run it if (result != null) { if (result.SearchResult.TotalRowCount > 0) { DataTable resTable = result.SearchResult.Table; resTable.Columns.Add("ImagePath"); foreach (DataRow dr in resTable.Rows) { string AssociationId = "82de7c93-0004-c334-b8e8-0b3b889fab82"; string PartitionId = "26429"; var imgAdd = dr[2]; if (dr[2].ToString() != "") { //dr["ImagePath"] = "https://images.membersuite.com/" + AssociationId + "/" + PartitionId + "/" + dr[2]; dr["ImagePath"] = "https://www.iwla.com/assets/1/23/" + dr["Image.Name"]; } else { dr["ImagePath"] = "https://www.iwla.com/cms/images/notfound.png"; } } // btnMap.Visible = true; Session["partnerTablehw"] = resTable; Repeater1.DataSource = resTable; Repeater1.DataBind(); int recordCount = result.SearchResult.TotalRowCount; this.PopulatePager(recordCount, pageIndex, pageSize); } else { Session["partnerTablehw"] = null; } } else { Session["partnerTablehw"] = null; } }