コード例 #1
0
        public bool Insert(string Name)
        {
            EligibilityStatusDAC eligibilitystatusComponent = new EligibilityStatusDAC();
            int EligibilityStatusId = 0;

            return(eligibilitystatusComponent.InsertNewEligibilityStatus(ref EligibilityStatusId, Name));
        }
コード例 #2
0
        public List <EligibilityStatus> GetAll()
        {
            EligibilityStatusDAC     _eligibilityStatusComponent = new EligibilityStatusDAC();
            IDataReader              reader = _eligibilityStatusComponent.GetAllEligibilityStatus().CreateDataReader();
            List <EligibilityStatus> _eligibilityStatusList = new List <EligibilityStatus>();

            while (reader.Read())
            {
                if (_eligibilityStatusList == null)
                {
                    _eligibilityStatusList = new List <EligibilityStatus>();
                }
                EligibilityStatus _eligibilityStatus = new EligibilityStatus();
                if (reader["EligibilityStatusId"] != DBNull.Value)
                {
                    _eligibilityStatus.EligibilityStatusId = Convert.ToInt32(reader["EligibilityStatusId"]);
                }
                if (reader["Name"] != DBNull.Value)
                {
                    _eligibilityStatus.Name = Convert.ToString(reader["Name"]);
                }
                _eligibilityStatus.NewRecord = false;
                _eligibilityStatusList.Add(_eligibilityStatus);
            }
            reader.Close();
            return(_eligibilityStatusList);
        }
コード例 #3
0
        public bool Insert(EligibilityStatus eligibilitystatus)
        {
            int autonumber = 0;
            EligibilityStatusDAC eligibilitystatusComponent = new EligibilityStatusDAC();
            bool endedSuccessfuly = eligibilitystatusComponent.InsertNewEligibilityStatus(ref autonumber, eligibilitystatus.Name);

            if (endedSuccessfuly)
            {
                eligibilitystatus.EligibilityStatusId = autonumber;
            }
            return(endedSuccessfuly);
        }
コード例 #4
0
        public EligibilityStatus GetByID(int _eligibilityStatusId)
        {
            EligibilityStatusDAC _eligibilityStatusComponent = new EligibilityStatusDAC();
            IDataReader          reader             = _eligibilityStatusComponent.GetByIDEligibilityStatus(_eligibilityStatusId);
            EligibilityStatus    _eligibilityStatus = null;

            while (reader.Read())
            {
                _eligibilityStatus = new EligibilityStatus();
                if (reader["EligibilityStatusId"] != DBNull.Value)
                {
                    _eligibilityStatus.EligibilityStatusId = Convert.ToInt32(reader["EligibilityStatusId"]);
                }
                if (reader["Name"] != DBNull.Value)
                {
                    _eligibilityStatus.Name = Convert.ToString(reader["Name"]);
                }
                _eligibilityStatus.NewRecord = false;
            }
            reader.Close();
            return(_eligibilityStatus);
        }
コード例 #5
0
        public void Delete(int Original_EligibilityStatusId)
        {
            EligibilityStatusDAC eligibilitystatusComponent = new EligibilityStatusDAC();

            eligibilitystatusComponent.DeleteEligibilityStatus(Original_EligibilityStatusId);
        }
コード例 #6
0
        public bool Update(string Name, int Original_EligibilityStatusId)
        {
            EligibilityStatusDAC eligibilitystatusComponent = new EligibilityStatusDAC();

            return(eligibilitystatusComponent.UpdateEligibilityStatus(Name, Original_EligibilityStatusId));
        }
コード例 #7
0
        public bool Update(EligibilityStatus eligibilitystatus, int old_eligibilityStatusId)
        {
            EligibilityStatusDAC eligibilitystatusComponent = new EligibilityStatusDAC();

            return(eligibilitystatusComponent.UpdateEligibilityStatus(eligibilitystatus.Name, old_eligibilityStatusId));
        }
コード例 #8
0
        public int UpdateDataset(System.Data.DataSet dataset)
        {
            EligibilityStatusDAC eligibilitystatuscomponent = new EligibilityStatusDAC();

            return(eligibilitystatuscomponent.UpdateDataset(dataset));
        }