Пример #1
0
 public List<ConferenceSpeakers> GetAll()
 {
     ConferenceSpeakersDAC _conferenceSpeakersComponent = new ConferenceSpeakersDAC();
     IDataReader reader = _conferenceSpeakersComponent.GetAllConferenceSpeakers().CreateDataReader();
     List<ConferenceSpeakers> _conferenceSpeakersList = new List<ConferenceSpeakers>();
     while (reader.Read())
     {
         if (_conferenceSpeakersList == null)
             _conferenceSpeakersList = new List<ConferenceSpeakers>();
         ConferenceSpeakers _conferenceSpeakers = new ConferenceSpeakers();
         if (reader["ConferenceSpeakerId"] != DBNull.Value)
             _conferenceSpeakers.ConferenceSpeakerId = Convert.ToInt32(reader["ConferenceSpeakerId"]);
         if (reader["PersonId"] != DBNull.Value)
             _conferenceSpeakers.PersonId = Convert.ToInt32(reader["PersonId"]);
         if (reader["ConferenceId"] != DBNull.Value)
             _conferenceSpeakers.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
         if (reader["DateRegistered"] != DBNull.Value)
             _conferenceSpeakers.DateRegistered = Convert.ToDateTime(reader["DateRegistered"]);
         if (reader["SpeakerImage"] != DBNull.Value)
             _conferenceSpeakers.SpeakerImage = Convert.ToString(reader["SpeakerImage"]);
         if (reader["SpeakerPosition"] != DBNull.Value)
             _conferenceSpeakers.SpeakerPosition = Convert.ToString(reader["SpeakerPosition"]);
         if (reader["SpeakerBio"] != DBNull.Value)
             _conferenceSpeakers.SpeakerBio = Convert.ToString(reader["SpeakerBio"]);
         if (reader["FlightfromCountry"] != DBNull.Value)
             _conferenceSpeakers.FlightfromCountry = Convert.ToString(reader["FlightfromCountry"]);
         if (reader["FlightFromCity"] != DBNull.Value)
             _conferenceSpeakers.FlightFromCity = Convert.ToString(reader["FlightFromCity"]);
         if (reader["FlightToCountry"] != DBNull.Value)
             _conferenceSpeakers.FlightToCountry = Convert.ToString(reader["FlightToCountry"]);
         if (reader["FlightToCity"] != DBNull.Value)
             _conferenceSpeakers.FlightToCity = Convert.ToString(reader["FlightToCity"]);
         if (reader["FlightNO"] != DBNull.Value)
             _conferenceSpeakers.FlightNO = Convert.ToString(reader["FlightNO"]);
         if (reader["ArrivalDate"] != DBNull.Value)
             _conferenceSpeakers.ArrivalDate = Convert.ToDateTime(reader["ArrivalDate"]);
         if (reader["ArrivalTime"] != DBNull.Value)
             _conferenceSpeakers.ArrivalTime = Convert.ToString(reader["ArrivalTime"]);
         if (reader["DepratureDate"] != DBNull.Value)
             _conferenceSpeakers.DepratureDate = Convert.ToDateTime(reader["DepratureDate"]);
         if (reader["DepratureTime"] != DBNull.Value)
             _conferenceSpeakers.DepratureTime = Convert.ToString(reader["DepratureTime"]);
         if (reader["AirllineID"] != DBNull.Value)
             _conferenceSpeakers.AirllineID = Convert.ToInt32(reader["AirllineID"]);
         if (reader["HotelID"] != DBNull.Value)
             _conferenceSpeakers.HotelID = Convert.ToInt32(reader["HotelID"]);
         if (reader["ResponsiblePersonID"] != DBNull.Value)
             _conferenceSpeakers.ResponsiblePersonID = Convert.ToInt32(reader["ResponsiblePersonID"]);
         if (reader["ArrivalTimeAMorPM"] != DBNull.Value)
             _conferenceSpeakers.ArrivalTimeAMorPM = Convert.ToString(reader["ArrivalTimeAMorPM"]);
         if (reader["DepratureTimeAMorPM"] != DBNull.Value)
             _conferenceSpeakers.DepratureTimeAMorPM = Convert.ToString(reader["DepratureTimeAMorPM"]);
         _conferenceSpeakers.NewRecord = false;
         _conferenceSpeakersList.Add(_conferenceSpeakers);
     } reader.Close();
     return _conferenceSpeakersList;
 }
Пример #2
0
 public bool Update(ConferenceSpeakers conferencespeakers, int old_conferenceSpeakerId)
 {
     ConferenceSpeakersDAC conferencespeakersComponent = new ConferenceSpeakersDAC();
     return conferencespeakersComponent.UpdateConferenceSpeakers( conferencespeakers.PersonId,  conferencespeakers.ConferenceId,  conferencespeakers.DateRegistered,  conferencespeakers.SpeakerImage,  conferencespeakers.SpeakerPosition,  conferencespeakers.SpeakerBio,  conferencespeakers.FlightfromCountry,  conferencespeakers.FlightFromCity,  conferencespeakers.FlightToCountry,  conferencespeakers.FlightToCity,  conferencespeakers.FlightNO,  conferencespeakers.ArrivalDate,  conferencespeakers.ArrivalTime,  conferencespeakers.DepratureDate,  conferencespeakers.DepratureTime,  conferencespeakers.AirllineID,  conferencespeakers.HotelID,  conferencespeakers.ResponsiblePersonID,conferencespeakers.ArrivalTimeAMorPM, conferencespeakers.DepratureTimeAMorPM , old_conferenceSpeakerId);
 }
Пример #3
0
 public bool Insert(ConferenceSpeakers conferencespeakers)
 {
     int autonumber = 0;
     ConferenceSpeakersDAC conferencespeakersComponent = new ConferenceSpeakersDAC();
     bool endedSuccessfuly = conferencespeakersComponent.InsertNewConferenceSpeakers(ref autonumber, conferencespeakers.PersonId, conferencespeakers.ConferenceId, conferencespeakers.DateRegistered, conferencespeakers.SpeakerImage, conferencespeakers.SpeakerPosition, conferencespeakers.SpeakerBio, conferencespeakers.FlightfromCountry, conferencespeakers.FlightFromCity, conferencespeakers.FlightToCountry, conferencespeakers.FlightToCity, conferencespeakers.FlightNO, conferencespeakers.ArrivalDate, conferencespeakers.ArrivalTime, conferencespeakers.DepratureDate, conferencespeakers.DepratureTime, conferencespeakers.AirllineID, conferencespeakers.HotelID, conferencespeakers.ResponsiblePersonID, conferencespeakers.ArrivalTimeAMorPM, conferencespeakers.DepratureTimeAMorPM);
     if (endedSuccessfuly)
     {
         conferencespeakers.ConferenceSpeakerId = autonumber;
     }
     return endedSuccessfuly;
 }