Example #1
0
        public void SelectCombo(string compareQuery)
        {
            int    errorNumber      = 0;
            string errorDescription = null;

            IList <Framework.DataServices.Model.EntityBaseData> result = _daoBase.SelectCombo(
                _currentUser, out errorNumber, out errorDescription);

            if (result == null)
            {
                throw new AssertTestException("Couldn't load the combo");
            }

            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 != result.Count)
            {
                throw new AssertTestException("The result contains the quantity rows different from oridinal database.");
            }
        }
Example #2
0
        public IList <Framework.DataServices.Model.EntityBaseData> SelectCombo(params object[] fields)
        {
            int    errorNumber      = 0;
            string errorDescription = null;

            IList <Framework.DataServices.Model.EntityBaseData> list = _daoBase.SelectCombo(
                _currentLogin, out errorNumber, out errorDescription, fields);

            if (errorNumber != 0 || !string.IsNullOrEmpty(errorDescription))
            {
                return(null);
            }

            return(list);
        }