WFA_psychometric_chart.Form1_main.CheckLatLongAvailable C# (CSharp) Method

CheckLatLongAvailable() public method

public CheckLatLongAvailable ( ) : bool
return bool
        public bool CheckLatLongAvailable()
        {
            //--Lets do some connection checking and validating the data returned...
            string databasePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string databaseFile = databasePath + @"\db_psychrometric_project.s3db";
            string connString = @"Data Source=" + databaseFile + ";Version=3;";
            bool returnValue = false;
            string latValue = "";
            string lngValue = "";
            using (SQLiteConnection connection = new SQLiteConnection(connString))
            {
                connection.Open();
                SQLiteDataReader reader = null;
                string queryString = "SELECT * from tbl_building_location WHERE selection=1";
                SQLiteCommand command = new SQLiteCommand(queryString, connection);
                //command.Parameters.AddWithValue("@index", index);
                //command.Parameters.Add("@index",DbType.Int32).Value= index_selected;
                // command.Parameters.AddWithValue("@index", index_selected);

                reader = command.ExecuteReader();
                while (reader.Read())
                {
                    //ListboxItems.Add(reader[1].ToString()+","+reader[2].ToString());
                    latValue = reader["latitude"].ToString();
                    lngValue = reader["longitude"].ToString();
                }
              //  MessageBox.Show("latitude value " + latValue + ",longvalue = " + lngValue);
            }
            if ((latValue == "" || lngValue =="" ) || (latValue ==0.ToString() && lngValue == 0.ToString() ))
            {
                returnValue = true;
               // MessageBox.Show("value is ture = " + returnValue);

            }
       
            //--This will be either true or false based on the check value..
            return returnValue;
        }
        string latPulledValue, longPulledValue, elevationPulledValue;
Form1_main