示例#1
0
        public bool Load()
        {
            int    errorNumber      = 0;
            string errorDescription = null;

            Framework.DataServices.Model.EntityBaseData result = _daoBase.Load(
                _currentLogin, this, out errorNumber, out errorDescription);

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

            Model.DadosBasicos.Time model = (Model.DadosBasicos.Time)result;

            this.Nome         = model.Nome;
            this.ActiveFlag   = model.ActiveFlag;
            this.Cidade       = model.Cidade;
            this.CreatedBy    = model.CreatedBy;
            this.CreatedDate  = model.CreatedDate;
            this.Descricao    = model.Descricao;
            this.Escudo       = model.Escudo;
            this.Estado       = model.Estado;
            this.Fundacao     = model.Fundacao;
            this.IsClube      = model.IsClube;
            this.Mascote      = model.Mascote;
            this.ModifiedBy   = model.ModifiedBy;
            this.ModifiedDate = model.ModifiedDate;
            this.NomeMascote  = model.NomeMascote;
            this.Pais         = model.Pais;
            this.Site         = model.Site;


            return(errorNumber == 0 ? true : false);
        }
示例#2
0
        public void Load(Framework.DataServices.Model.EntityBaseData entry)
        {
            int    errorNumber      = 0;
            string errorDescription = null;

            Framework.DataServices.Model.EntityBaseData result = _daoBase.Load(
                _currentUser, entry, out errorNumber, out errorDescription);

            if (result == null)
            {
                throw new AssertTestException("There is no result loaded");
            }

            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);
            }
        }