Beispiel #1
0
        public EligibleRequestStatusHistory GetByID(int _eligibilityRequestStatusId)
        {
            EligibleRequestStatusHistoryDAC _eligibleRequestStatusHistoryComponent = new EligibleRequestStatusHistoryDAC();
            IDataReader reader = _eligibleRequestStatusHistoryComponent.GetByIDEligibleRequestStatusHistory(_eligibilityRequestStatusId);
            EligibleRequestStatusHistory _eligibleRequestStatusHistory = null;

            while (reader.Read())
            {
                _eligibleRequestStatusHistory = new EligibleRequestStatusHistory();
                if (reader["EligibilityRequestStatusId"] != DBNull.Value)
                {
                    _eligibleRequestStatusHistory.EligibilityRequestStatusId = Convert.ToInt32(reader["EligibilityRequestStatusId"]);
                }
                if (reader["EligibilityStatusId"] != DBNull.Value)
                {
                    _eligibleRequestStatusHistory.EligibilityStatusId = Convert.ToInt32(reader["EligibilityStatusId"]);
                }
                if (reader["EligibileId"] != DBNull.Value)
                {
                    _eligibleRequestStatusHistory.EligibileId = Convert.ToInt32(reader["EligibileId"]);
                }
                if (reader["CreationDate"] != DBNull.Value)
                {
                    _eligibleRequestStatusHistory.CreationDate = Convert.ToDateTime(reader["CreationDate"]);
                }
                if (reader["Notes"] != DBNull.Value)
                {
                    _eligibleRequestStatusHistory.Notes = Convert.ToString(reader["Notes"]);
                }
                _eligibleRequestStatusHistory.NewRecord = false;
            }
            reader.Close();
            return(_eligibleRequestStatusHistory);
        }
Beispiel #2
0
        public bool Insert(EligibleRequestStatusHistory eligiblerequeststatushistory)
        {
            int autonumber = 0;
            EligibleRequestStatusHistoryDAC eligiblerequeststatushistoryComponent = new EligibleRequestStatusHistoryDAC();
            bool endedSuccessfuly = eligiblerequeststatushistoryComponent.InsertNewEligibleRequestStatusHistory(ref autonumber, eligiblerequeststatushistory.EligibilityStatusId, eligiblerequeststatushistory.EligibileId, eligiblerequeststatushistory.CreationDate, eligiblerequeststatushistory.Notes);

            if (endedSuccessfuly)
            {
                eligiblerequeststatushistory.EligibilityRequestStatusId = autonumber;
            }
            return(endedSuccessfuly);
        }
Beispiel #3
0
        public List <EligibleRequestStatusHistory> GetAll()
        {
            EligibleRequestStatusHistoryDAC _eligibleRequestStatusHistoryComponent = new EligibleRequestStatusHistoryDAC();
            IDataReader reader = _eligibleRequestStatusHistoryComponent.GetAllEligibleRequestStatusHistory().CreateDataReader();
            List <EligibleRequestStatusHistory> _eligibleRequestStatusHistoryList = new List <EligibleRequestStatusHistory>();

            while (reader.Read())
            {
                if (_eligibleRequestStatusHistoryList == null)
                {
                    _eligibleRequestStatusHistoryList = new List <EligibleRequestStatusHistory>();
                }
                EligibleRequestStatusHistory _eligibleRequestStatusHistory = new EligibleRequestStatusHistory();
                if (reader["EligibilityRequestStatusId"] != DBNull.Value)
                {
                    _eligibleRequestStatusHistory.EligibilityRequestStatusId = Convert.ToInt32(reader["EligibilityRequestStatusId"]);
                }
                if (reader["EligibilityStatusId"] != DBNull.Value)
                {
                    _eligibleRequestStatusHistory.EligibilityStatusId = Convert.ToInt32(reader["EligibilityStatusId"]);
                }
                if (reader["EligibileId"] != DBNull.Value)
                {
                    _eligibleRequestStatusHistory.EligibileId = Convert.ToInt32(reader["EligibileId"]);
                }
                if (reader["CreationDate"] != DBNull.Value)
                {
                    _eligibleRequestStatusHistory.CreationDate = Convert.ToDateTime(reader["CreationDate"]);
                }
                if (reader["Notes"] != DBNull.Value)
                {
                    _eligibleRequestStatusHistory.Notes = Convert.ToString(reader["Notes"]);
                }
                _eligibleRequestStatusHistory.NewRecord = false;
                _eligibleRequestStatusHistoryList.Add(_eligibleRequestStatusHistory);
            }
            reader.Close();
            return(_eligibleRequestStatusHistoryList);
        }
Beispiel #4
0
        public bool Update(EligibleRequestStatusHistory eligiblerequeststatushistory, int old_eligibilityRequestStatusId)
        {
            EligibleRequestStatusHistoryDAC eligiblerequeststatushistoryComponent = new EligibleRequestStatusHistoryDAC();

            return(eligiblerequeststatushistoryComponent.UpdateEligibleRequestStatusHistory(eligiblerequeststatushistory.EligibilityStatusId, eligiblerequeststatushistory.EligibileId, eligiblerequeststatushistory.CreationDate, eligiblerequeststatushistory.Notes, old_eligibilityRequestStatusId));
        }