public bool Insert(string Name, int ConferenceId) { ScheduleSessionTypeDAC schedulesessiontypeComponent = new ScheduleSessionTypeDAC(); int ScheduleSessionTypeId = 0; return(schedulesessiontypeComponent.InsertNewScheduleSessionType(ref ScheduleSessionTypeId, Name, ConferenceId)); }
public List <ScheduleSessionType> GetAll() { ScheduleSessionTypeDAC _scheduleSessionTypeComponent = new ScheduleSessionTypeDAC(); IDataReader reader = _scheduleSessionTypeComponent.GetAllScheduleSessionType().CreateDataReader(); List <ScheduleSessionType> _scheduleSessionTypeList = new List <ScheduleSessionType>(); while (reader.Read()) { if (_scheduleSessionTypeList == null) { _scheduleSessionTypeList = new List <ScheduleSessionType>(); } ScheduleSessionType _scheduleSessionType = new ScheduleSessionType(); if (reader["ScheduleSessionTypeId"] != DBNull.Value) { _scheduleSessionType.ScheduleSessionTypeId = Convert.ToInt32(reader["ScheduleSessionTypeId"]); } if (reader["Name"] != DBNull.Value) { _scheduleSessionType.Name = Convert.ToString(reader["Name"]); } if (reader["ConferenceId"] != DBNull.Value) { _scheduleSessionType.ConferenceId = Convert.ToInt32(reader["ConferenceId"]); } _scheduleSessionType.NewRecord = false; _scheduleSessionTypeList.Add(_scheduleSessionType); } reader.Close(); return(_scheduleSessionTypeList); }
public ScheduleSessionType GetByID(int _scheduleSessionTypeId) { ScheduleSessionTypeDAC _scheduleSessionTypeComponent = new ScheduleSessionTypeDAC(); IDataReader reader = _scheduleSessionTypeComponent.GetByIDScheduleSessionType(_scheduleSessionTypeId); ScheduleSessionType _scheduleSessionType = null; while (reader.Read()) { _scheduleSessionType = new ScheduleSessionType(); if (reader["ScheduleSessionTypeId"] != DBNull.Value) { _scheduleSessionType.ScheduleSessionTypeId = Convert.ToInt32(reader["ScheduleSessionTypeId"]); } if (reader["Name"] != DBNull.Value) { _scheduleSessionType.Name = Convert.ToString(reader["Name"]); } if (reader["ConferenceId"] != DBNull.Value) { _scheduleSessionType.ConferenceId = Convert.ToInt32(reader["ConferenceId"]); } _scheduleSessionType.NewRecord = false; } reader.Close(); return(_scheduleSessionType); }
public bool Insert(ScheduleSessionType schedulesessiontype) { int autonumber = 0; ScheduleSessionTypeDAC schedulesessiontypeComponent = new ScheduleSessionTypeDAC(); bool endedSuccessfuly = schedulesessiontypeComponent.InsertNewScheduleSessionType(ref autonumber, schedulesessiontype.Name, schedulesessiontype.ConferenceId); if (endedSuccessfuly) { schedulesessiontype.ScheduleSessionTypeId = autonumber; } return(endedSuccessfuly); }
public bool Update(string Name, int ConferenceId, int Original_ScheduleSessionTypeId) { ScheduleSessionTypeDAC schedulesessiontypeComponent = new ScheduleSessionTypeDAC(); return(schedulesessiontypeComponent.UpdateScheduleSessionType(Name, ConferenceId, Original_ScheduleSessionTypeId)); }
public bool Update(ScheduleSessionType schedulesessiontype, int old_scheduleSessionTypeId) { ScheduleSessionTypeDAC schedulesessiontypeComponent = new ScheduleSessionTypeDAC(); return(schedulesessiontypeComponent.UpdateScheduleSessionType(schedulesessiontype.Name, schedulesessiontype.ConferenceId, old_scheduleSessionTypeId)); }
public int UpdateDataset(System.Data.DataSet dataset) { ScheduleSessionTypeDAC schedulesessiontypecomponent = new ScheduleSessionTypeDAC(); return(schedulesessiontypecomponent.UpdateDataset(dataset)); }
public void Delete(int Original_ScheduleSessionTypeId) { ScheduleSessionTypeDAC schedulesessiontypeComponent = new ScheduleSessionTypeDAC(); schedulesessiontypeComponent.DeleteScheduleSessionType(Original_ScheduleSessionTypeId); }