public bool delete(OBALog.Model.ML_Address address) { MySqlParameter[] para = new MySqlParameter[1]; para[0] = new MySqlParameter("@Key", address.Key); MySQLHelper.ExecuteNonQuery(DBConnection.connectionString, CommandType.Text, "DELETE FROM address WHERE `Key` = @Key;", para); return(true); }
public bool update(OBALog.Model.ML_Address address) { MySqlParameter[] para = new MySqlParameter[6]; para[0] = new MySqlParameter("@Address", address.Address); para[1] = new MySqlParameter("@Telephone", address.Telephone); para[2] = new MySqlParameter("@CityKey", address.CityKey); para[3] = new MySqlParameter("@UserKey", address.UserKey); para[4] = new MySqlParameter("@Key", address.Key); para[5] = new MySqlParameter("@UpdatedDate", address.UpdatedDate); MySQLHelper.ExecuteNonQuery(DBConnection.connectionString, CommandType.Text, "UPDATE stc_oba.address SET Address = @Address ,CityKey = @CityKey ,Telephone = @Telephone ,UserKey = @UserKey , UpdatedDate = @UpdatedDate WHERE `Key` = @Key", para); return(true); }
public int insert(OBALog.Model.ML_Address address) { MySqlParameter[] para = new MySqlParameter[5]; para[0] = new MySqlParameter("@Address", address.Address); para[1] = new MySqlParameter("@Telephone", address.Telephone); para[2] = new MySqlParameter("@CityKey", address.CityKey); para[3] = new MySqlParameter("@UserKey", address.UserKey); para[4] = new MySqlParameter("@UpdatedDate", address.UpdatedDate); object insertedId = MySQLHelper.ExecuteScalar(DBConnection.connectionString, CommandType.Text, "INSERT INTO stc_oba.address (Address ,CityKey ,Telephone ,UserKey ,UpdatedDate ) VALUES ( @Address ,@CityKey ,@Telephone ,@UserKey , @UpdatedDate ); SELECT LAST_INSERT_ID();", para); return(Convert.ToInt32(insertedId)); }
public bool update(OBALog.Model.ML_Address address) { return(new OBALog.Data.DL_Address().update(address)); }
public int insert(OBALog.Model.ML_Address address) { return(new OBALog.Data.DL_Address().insert(address)); }
public System.Data.DataTable select(OBALog.Model.ML_Address address) { return(new OBALog.Data.DL_Address().select(address)); }