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);
        }
        public ConferenceSpeakers GetByID(int _conferenceSpeakerId)
        {
            ConferenceSpeakersDAC _conferenceSpeakersComponent = new ConferenceSpeakersDAC();
            IDataReader           reader = _conferenceSpeakersComponent.GetByIDConferenceSpeakers(_conferenceSpeakerId);
            ConferenceSpeakers    _conferenceSpeakers = null;

            while (reader.Read())
            {
                _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;
            }
            reader.Close();
            return(_conferenceSpeakers);
        }
        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));
        }
        public List <ConferenceSpeakers> GetAll(int ConferenceId, int LanguageId)
        {
            ConferenceSpeakersDAC     _conferenceSpeakersComponent = new ConferenceSpeakersDAC();
            IDataReader               reader = _conferenceSpeakersComponent.GetAllConferenceSpeakers(" ConferenceId = " + ConferenceId).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 = reader["SpeakerImage"].ToString();
                }
                if (reader["SpeakerPosition"] != DBNull.Value)
                {
                    _conferenceSpeakers.SpeakerPosition = reader["SpeakerPosition"].ToString();
                }
                if (reader["SpeakerBio"] != DBNull.Value)
                {
                    _conferenceSpeakers.SpeakerBio = reader["SpeakerBio"].ToString();
                }

                if (reader["FlightFromCountry"] != DBNull.Value)
                {
                    _conferenceSpeakers.FlightfromCountry = reader["FlightFromCountry"].ToString();
                }
                if (reader["FlightFromCity"] != DBNull.Value)
                {
                    _conferenceSpeakers.FlightFromCity = reader["FlightFromCity"].ToString();
                }
                if (reader["FlightToCountry"] != DBNull.Value)
                {
                    _conferenceSpeakers.FlightToCountry = reader["FlightToCountry"].ToString();
                }
                if (reader["FlightToCity"] != DBNull.Value)
                {
                    _conferenceSpeakers.FlightToCity = reader["FlightToCity"].ToString();
                }
                if (reader["FlightNO"] != DBNull.Value)
                {
                    _conferenceSpeakers.FlightNO = reader["FlightNO"].ToString();
                }
                if (reader["ArrivalDate"] != DBNull.Value)
                {
                    _conferenceSpeakers.ArrivalDate = Convert.ToDateTime(reader["ArrivalDate"].ToString());
                }
                if (reader["ArrivalTime"] != DBNull.Value)
                {
                    _conferenceSpeakers.ArrivalTime = reader["ArrivalTime"].ToString();
                }
                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"].ToString());
                }
                if (reader["HotelID"] != DBNull.Value)
                {
                    _conferenceSpeakers.HotelID = Convert.ToInt32(reader["HotelID"].ToString());
                }
                if (reader["ResponsiblePersonID"] != DBNull.Value)
                {
                    _conferenceSpeakers.ResponsiblePersonID = Convert.ToInt32(reader["ResponsiblePersonID"].ToString());
                }
                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;
                _conferenceSpeakers.UpdateSpeakerLanguage(LanguageId);
                _conferenceSpeakersList.Add(_conferenceSpeakers);
            }
            reader.Close();
            return(_conferenceSpeakersList);
        }