public List <EligibilityConsultant> GetAllByDepartmentId(int EligibilityDepartmentId)
        {
            EligibilityConsultantDAC _eligibilityConsultantComponent = new EligibilityConsultantDAC();
            IDataReader reader = _eligibilityConsultantComponent.GetAllEligibilityConsultant("EligibilityDepartmentId = " + EligibilityDepartmentId).CreateDataReader();
            List <EligibilityConsultant> _eligibilityConsultantList = new List <EligibilityConsultant>();

            while (reader.Read())
            {
                if (_eligibilityConsultantList == null)
                {
                    _eligibilityConsultantList = new List <EligibilityConsultant>();
                }
                EligibilityConsultant _eligibilityConsultant = new EligibilityConsultant();
                if (reader["EligibilityConsultantId"] != DBNull.Value)
                {
                    _eligibilityConsultant.EligibilityConsultantId = Convert.ToInt32(reader["EligibilityConsultantId"]);
                }
                if (reader["EligibilityDepartmentId"] != DBNull.Value)
                {
                    _eligibilityConsultant.EligibilityDepartmentId = Convert.ToInt32(reader["EligibilityDepartmentId"]);
                }
                if (reader["PersonId"] != DBNull.Value)
                {
                    _eligibilityConsultant.PersonId = Convert.ToInt32(reader["PersonId"]);
                }
                if (reader["DateAssigned"] != DBNull.Value)
                {
                    _eligibilityConsultant.DateAssigned = Convert.ToDateTime(reader["DateAssigned"]);
                }
                _eligibilityConsultant.NewRecord = false;
                _eligibilityConsultantList.Add(_eligibilityConsultant);
            }
            reader.Close();
            return(_eligibilityConsultantList);
        }
        public EligibilityConsultant GetByID(int _eligibilityConsultantId)
        {
            EligibilityConsultantDAC _eligibilityConsultantComponent = new EligibilityConsultantDAC();
            IDataReader           reader = _eligibilityConsultantComponent.GetByIDEligibilityConsultant(_eligibilityConsultantId);
            EligibilityConsultant _eligibilityConsultant = null;

            while (reader.Read())
            {
                _eligibilityConsultant = new EligibilityConsultant();
                if (reader["EligibilityConsultantId"] != DBNull.Value)
                {
                    _eligibilityConsultant.EligibilityConsultantId = Convert.ToInt32(reader["EligibilityConsultantId"]);
                }
                if (reader["EligibilityDepartmentId"] != DBNull.Value)
                {
                    _eligibilityConsultant.EligibilityDepartmentId = Convert.ToInt32(reader["EligibilityDepartmentId"]);
                }
                if (reader["PersonId"] != DBNull.Value)
                {
                    _eligibilityConsultant.PersonId = Convert.ToInt32(reader["PersonId"]);
                }
                if (reader["DateAssigned"] != DBNull.Value)
                {
                    _eligibilityConsultant.DateAssigned = Convert.ToDateTime(reader["DateAssigned"]);
                }
                _eligibilityConsultant.NewRecord = false;
            }
            reader.Close();
            return(_eligibilityConsultant);
        }
        public bool Insert(EligibilityConsultant eligibilityconsultant)
        {
            int autonumber = 0;
            EligibilityConsultantDAC eligibilityconsultantComponent = new EligibilityConsultantDAC();
            bool endedSuccessfuly = eligibilityconsultantComponent.InsertNewEligibilityConsultant(ref autonumber, eligibilityconsultant.EligibilityDepartmentId, eligibilityconsultant.DivisionID, eligibilityconsultant.PersonId, eligibilityconsultant.DateAssigned, eligibilityconsultant.Poisition);

            if (endedSuccessfuly)
            {
                eligibilityconsultant.EligibilityConsultantId = autonumber;
            }
            return(endedSuccessfuly);
        }
        public bool Update(EligibilityConsultant eligibilityconsultant, int old_eligibilityConsultantId)
        {
            EligibilityConsultantDAC eligibilityconsultantComponent = new EligibilityConsultantDAC();

            return(eligibilityconsultantComponent.UpdateEligibilityConsultant(eligibilityconsultant.EligibilityDepartmentId, eligibilityconsultant.DivisionID, eligibilityconsultant.PersonId, eligibilityconsultant.DateAssigned, eligibilityconsultant.Poisition, old_eligibilityConsultantId));
        }