public bool Insert(string Name) { EligibilityStatusDAC eligibilitystatusComponent = new EligibilityStatusDAC(); int EligibilityStatusId = 0; return(eligibilitystatusComponent.InsertNewEligibilityStatus(ref EligibilityStatusId, Name)); }
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); }
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); }
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); }
public void Delete(int Original_EligibilityStatusId) { EligibilityStatusDAC eligibilitystatusComponent = new EligibilityStatusDAC(); eligibilitystatusComponent.DeleteEligibilityStatus(Original_EligibilityStatusId); }
public bool Update(string Name, int Original_EligibilityStatusId) { EligibilityStatusDAC eligibilitystatusComponent = new EligibilityStatusDAC(); return(eligibilitystatusComponent.UpdateEligibilityStatus(Name, Original_EligibilityStatusId)); }
public bool Update(EligibilityStatus eligibilitystatus, int old_eligibilityStatusId) { EligibilityStatusDAC eligibilitystatusComponent = new EligibilityStatusDAC(); return(eligibilitystatusComponent.UpdateEligibilityStatus(eligibilitystatus.Name, old_eligibilityStatusId)); }
public int UpdateDataset(System.Data.DataSet dataset) { EligibilityStatusDAC eligibilitystatuscomponent = new EligibilityStatusDAC(); return(eligibilitystatuscomponent.UpdateDataset(dataset)); }