Example #1
0
        public DataTable select(Model.ML_City city)
        {
            MySqlParameter[] para = new MySqlParameter[1];
            para[0] = new MySqlParameter("@City", city.City);

            return(MySQLHelper.ExecuteDataTable(DBConnection.connectionString, CommandType.Text, "SELECT c.`KEY` AS CountryKey, c.country, ct.`KEY` AS CityKey, ct.city FROM stc_oba.city ct JOIN country c ON ct.CountryKey = c.`KEY` WHERE city = COALESCE(@City, city)", para));
        }
Example #2
0
 public bool deleteByCountry(Model.ML_City city)
 {
     MySqlParameter[] para = new MySqlParameter[1];
     para[0] = new MySqlParameter("@CountryKey", city.CountryKey);
     MySQLHelper.ExecuteNonQuery(DBConnection.connectionString, CommandType.Text, "DELETE FROM city WHERE `CountryKey` = @CountryKey;", para);
     return(true);
 }
Example #3
0
 public System.Data.DataTable select(Model.ML_City city)
 {
     return(new OBALog.Data.DL_City().select(city));
 }
Example #4
0
 public bool deleteByCountry(Model.ML_City city)
 {
     return(new OBALog.Data.DL_City().deleteByCountry(city));
 }