public MsCrmResultObj <List <City> > GetCitites(string token) { MsCrmResultObj <List <City> > returnValue = new MsCrmResultObj <List <City> >(); LoginSession ls = new LoginSession(); try { #region | CHECK SESSION | MsCrmResultObj <LoginSession> sessionResult = GetUserSession(token); if (!sessionResult.Success) { returnValue.Result = sessionResult.Result; return(returnValue); } else { ls = sessionResult.ReturnObject; } #endregion _sda = new SqlDataAccess(); _sda.openConnection(Globals.ConnectionString); returnValue = LocationHelper.GetCities(_sda); } catch (Exception ex) { returnValue.HasException = true; returnValue.Result = ex.Message; } finally { if (_sda != null) { _sda.closeConnection(); } } return(returnValue); }