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)); }
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); }
public System.Data.DataTable select(Model.ML_City city) { return(new OBALog.Data.DL_City().select(city)); }
public bool deleteByCountry(Model.ML_City city) { return(new OBALog.Data.DL_City().deleteByCountry(city)); }