public void Delete(Framework.DataServices.Model.EntityBaseData entry, string compareQuery) { int errorNumber = 0; string errorDescription = null; bool result = _daoBase.Delete( _currentUser, entry, out errorNumber, out errorDescription); if (result == false) { throw new AssertTestException("Couldn't delete the item"); } if (errorNumber != 0) { throw new AssertTestException("There is an error number = " + errorNumber); } if (!string.IsNullOrEmpty(errorDescription)) { throw new AssertTestException("There is an error description = " + errorDescription); } object objResult = _commonDatabase.ExecuteScalar( System.Data.CommandType.Text, compareQuery, false, _currentUser); if ((int)objResult >= 1) { throw new AssertTestException("The row was not deleted in database."); } }
public bool Delete() { int errorNumber = 0; string errorDescription = null; bool result = _daoBase.Delete(_currentLogin, this, out errorNumber, out errorDescription); if (errorNumber != 0 || !string.IsNullOrEmpty(errorDescription)) { return(false); } return(result); }