public void EditLocation(int inputindex, string c, SQLConnection sql, string newValue)
        {
            var  CommandText            = "";
            var  beforeEditValue        = "";
            bool newValueIsCorrectInput = false;

            Location location = sql.OutputSingleLocation(inputindex);

            CommandText = $"SELECT COUNT(*) FROM contacts c INNER JOIN locations l WHERE l.LocationID = c.LocationID AND l.Address = '{location.Address}' AND l.CityName = '{location.CityName}';";
            long locHasConCount = sql.ExecuteScalar(CommandText);

            if (locHasConCount == 0)
            {
                if (c == "1")
                {
                    CommandText     = $"SELECT Address FROM locations WHERE LocationID = {inputindex};";
                    beforeEditValue = sql.GetBeforeEditValueString(inputindex, CommandText);

                    newValueIsCorrectInput = InputChecker.NoEmptyInputCheck(newValue);
                    CommandText            = $"UPDATE locations SET Address = '{newValue}' WHERE LocationID = {inputindex};";
                }
                else if (c == "2")
                {
                    CommandText     = $"SELECT CityName FROM locations WHERE LocationID = {inputindex};";
                    beforeEditValue = sql.GetBeforeEditValueString(inputindex, CommandText);

                    newValueIsCorrectInput = InputChecker.NoEmptyInputCheck(newValue);
                    CommandText            = $"UPDATE locations SET CityName = '{newValue}' WHERE LocationID = {inputindex};";
                }

                sql.ExecuteNonQuery(CommandText);
                //TODOL: message Contactname successfully changed from {beforeEditValue} to {newValue}!
                CommandText = $"SELECT COUNT(*) FROM locations l WHERE l.Address = '{location.Address}' AND l.CityName = '{location.CityName}';";
                long dupecount = sql.ExecuteScalar(CommandText);

                if (dupecount >= 2)
                {
                    CommandText = $"DELETE FROM locations WHERE LocationID = '{inputindex}';";
                    sql.ExecuteNonQuery(CommandText);
                    //TODOL: message Location with index: {inputindex} was a duplicate after editing and got removed.
                }
            }
            //TODOL: message WARNING: You can't edit a location that is linked to an existing contact
        }