protected WebLocationSearch()
 {
     objLocPresenter = new locSearchPresenter(this);
     objNearByPre = new nearbyPointPresenter(this);
     objSvcInfo = ServiceInfo.ServiceConfig;
     objDataPointInfo = DataPointInfo.getDataPointObject;
     objLocInfo = LocationInfo.getLocationInfoObj;
 }
 protected void Button3_Click(object sender, EventArgs e)
 {
     try
     {
         locSearchPresenter objLocPre = new locSearchPresenter();
         var itemList = objLocPre.getAutoSuggestLocation("FR", "Paris");
         TextBox3.Text = itemList.Count > 0 ? "LocationSearch has been successfully Tested" : "No data found. kindly check the LocationSearch service once again.";
     }
     catch (Exception ex)
     {
         TextBox3.Text = ex.Message;
     }
 }
        //Method to fetch location details
        public List<Location> getLocationDetails(string strPlaceName, string strCountry, string strCultureCode, LocationSearchSource strProvider)
        {
            double lat = 0.00;
            double lang = 0.00;
            locPre = new locSearchPresenter(this);
            try
            {
                //locPre.getLocationDetails(HttpUtility.HtmlDecode(strPlaceName), HttpUtility.HtmlDecode(strCountry), HttpUtility.HtmlDecode(strProvider), lat, lang, HttpUtility.HtmlDecode(strCultureCode));
            }
            catch (Exception ex)
            {
                AgriCastException currEx = new AgriCastException(GetServiceDetails(), ex);
                AgriCastLogger.Publish(currEx, AgriCastLogger.LogType.Error);
                // HttpContext.Current.Session["ErrorMessage"] = objComUtil.getTransText(Constants.WS_GETSVCDATA_FAILURE) + " : " + ex.Message.ToString();

            }
            finally
            {
                IDictionary dictAudit = new Hashtable();
                dictAudit["userIP"] = "";// HttpContext.Current.Request.UserHostAddress;
                dictAudit["userID"] =  "";
                dictAudit["token"] = "";
                dictAudit["referrer"] = "none";
                dictAudit["entrancePath"] = HttpContext.Current!=null?"EmbeddedJS":"WebService";
                dictAudit["culture"] = strCultureCode;
                dictAudit["sessionID"] = "";// HttpContext.Current.Session.SessionID;
                dictAudit["service"] = "LocSearchWebService";
                dictAudit["module"] = "";
                dictAudit["locSearchType"] = "";
                dictAudit["locSearchStringType"] = "";
                dictAudit["locSearchString"] = strPlaceName;
                dictAudit["locSearchDatasource"] = strProvider;
                dictAudit["numOfLocs"] = 0;
                if(lat==0)
                    dictAudit["searchLat"] = DBNull.Value;
                else
                dictAudit["searchLat"] = lat;
                if (lang == 0)
                    dictAudit["searchLong"] = DBNull.Value;
                else
                dictAudit["searchLong"] =lang;
                dictAudit["countryName"] = strCountry;
                dictAudit["locName"] = "";
                dictAudit["weatherDatasource"] = "";
                dictAudit["weatherLat"] = DBNull.Value;
                dictAudit["weatherLong"] = DBNull.Value;
                dictAudit["weatherDateFrom"] = "";
                dictAudit["weatherDateTo"] = "";
                dictAudit["weatherSeries"] = "";
                dictAudit["weatherParams"] = "";
                objSvcPre.SaveServiceAuditData(dictAudit);
            }
            return null;
        }
 /// <summary>
 /// Method to get the translated text by passing key value and language id
 /// </summary>
 public string getTranslatedText(string strLabelName, string strLangID)
 {
     locPre = new locSearchPresenter(this);
     return strTranslatedText;
 }
 /// <summary>
 /// Method to fetch the country name and area Id
 /// </summary>        
 //public DataSet getCountry()
 public DataTable getCountry()
 {
     locPre = new locSearchPresenter(this);
     locPre.getCountry();
     return dtCountry;
 }