Exemple #1
0
 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);
 }
Exemple #2
0
        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);
        }
Exemple #3
0
        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));
        }
Exemple #4
0
 public bool update(OBALog.Model.ML_Address address)
 {
     return(new OBALog.Data.DL_Address().update(address));
 }
Exemple #5
0
 public int insert(OBALog.Model.ML_Address address)
 {
     return(new OBALog.Data.DL_Address().insert(address));
 }
Exemple #6
0
 public System.Data.DataTable select(OBALog.Model.ML_Address address)
 {
     return(new OBALog.Data.DL_Address().select(address));
 }