示例#1
0
 public List<InvitedGuests> GetAll()
 {
     InvitedGuestsDAC _invitedGuestsComponent = new InvitedGuestsDAC();
     IDataReader reader = _invitedGuestsComponent.GetAllInvitedGuests().CreateDataReader();
     List<InvitedGuests> _invitedGuestsList = new List<InvitedGuests>();
     while (reader.Read())
     {
         if (_invitedGuestsList == null)
             _invitedGuestsList = new List<InvitedGuests>();
         InvitedGuests _invitedGuests = new InvitedGuests();
         if (reader["ID"] != DBNull.Value)
             _invitedGuests.ID = Convert.ToInt32(reader["ID"]);
         if (reader["PersonId"] != DBNull.Value)
             _invitedGuests.PersonId = Convert.ToInt32(reader["PersonId"]);
         if (reader["ConferenceId"] != DBNull.Value)
             _invitedGuests.ConferenceId = Convert.ToInt32(reader["ConferenceId"]);
         if (reader["DateRegistered"] != DBNull.Value)
             _invitedGuests.DateRegistered = Convert.ToDateTime(reader["DateRegistered"]);
         if (reader["SpeakerImage"] != DBNull.Value)
             _invitedGuests.SpeakerImage = Convert.ToString(reader["SpeakerImage"]);
         if (reader["SpeakerPosition"] != DBNull.Value)
             _invitedGuests.SpeakerPosition = Convert.ToString(reader["SpeakerPosition"]);
         if (reader["SpeakerBio"] != DBNull.Value)
             _invitedGuests.SpeakerBio = Convert.ToString(reader["SpeakerBio"]);
         if (reader["FlightfromCountry"] != DBNull.Value)
             _invitedGuests.FlightfromCountry = Convert.ToString(reader["FlightfromCountry"]);
         if (reader["FlightFromCity"] != DBNull.Value)
             _invitedGuests.FlightFromCity = Convert.ToString(reader["FlightFromCity"]);
         if (reader["FlightToCountry"] != DBNull.Value)
             _invitedGuests.FlightToCountry = Convert.ToString(reader["FlightToCountry"]);
         if (reader["FlightToCity"] != DBNull.Value)
             _invitedGuests.FlightToCity = Convert.ToString(reader["FlightToCity"]);
         if (reader["FlightNO"] != DBNull.Value)
             _invitedGuests.FlightNO = Convert.ToString(reader["FlightNO"]);
         if (reader["ArrivalDate"] != DBNull.Value)
             _invitedGuests.ArrivalDate = Convert.ToDateTime(reader["ArrivalDate"]);
         if (reader["ArrivalTime"] != DBNull.Value)
             _invitedGuests.ArrivalTime = Convert.ToString(reader["ArrivalTime"]);
         if (reader["DepratureDate"] != DBNull.Value)
             _invitedGuests.DepratureDate = Convert.ToDateTime(reader["DepratureDate"]);
         if (reader["DepratureTime"] != DBNull.Value)
             _invitedGuests.DepratureTime = Convert.ToString(reader["DepratureTime"]);
         if (reader["AirllineID"] != DBNull.Value)
             _invitedGuests.AirllineID = Convert.ToInt32(reader["AirllineID"]);
         if (reader["HotelID"] != DBNull.Value)
             _invitedGuests.HotelID = Convert.ToInt32(reader["HotelID"]);
         if (reader["ResponsiblePersonID"] != DBNull.Value)
             _invitedGuests.ResponsiblePersonID = Convert.ToInt32(reader["ResponsiblePersonID"]);
         if (reader["ArrivalTimeAMorPM"] != DBNull.Value)
             _invitedGuests.ArrivalTimeAMorPM = Convert.ToString(reader["ArrivalTimeAMorPM"]);
         if (reader["DepratureTimeAMorPM"] != DBNull.Value)
             _invitedGuests.DepratureTimeAMorPM = Convert.ToString(reader["DepratureTimeAMorPM"]);
         _invitedGuests.NewRecord = false;
         _invitedGuestsList.Add(_invitedGuests);
     } reader.Close();
     return _invitedGuestsList;
 }
示例#2
0
 public bool Update(InvitedGuests invitedguests, int old_iD)
 {
     InvitedGuestsDAC invitedguestsComponent = new InvitedGuestsDAC();
     return invitedguestsComponent.UpdateInvitedGuests(invitedguests.PersonId, invitedguests.ConferenceId, invitedguests.DateRegistered, invitedguests.SpeakerImage, invitedguests.SpeakerPosition, invitedguests.SpeakerBio, invitedguests.FlightfromCountry, invitedguests.FlightFromCity, invitedguests.FlightToCountry, invitedguests.FlightToCity, invitedguests.FlightNO, invitedguests.ArrivalDate, invitedguests.ArrivalTime, invitedguests.DepratureDate, invitedguests.DepratureTime, invitedguests.AirllineID, invitedguests.HotelID, invitedguests.ResponsiblePersonID, invitedguests.ArrivalTimeAMorPM,  invitedguests.DepratureTimeAMorPM ,old_iD);
 }
示例#3
0
 public bool Insert(InvitedGuests invitedguests)
 {
     int autonumber = 0;
     InvitedGuestsDAC invitedguestsComponent = new InvitedGuestsDAC();
     bool endedSuccessfuly = invitedguestsComponent.InsertNewInvitedGuests(ref autonumber, invitedguests.PersonId, invitedguests.ConferenceId, invitedguests.DateRegistered, invitedguests.SpeakerImage, invitedguests.SpeakerPosition, invitedguests.SpeakerBio, invitedguests.FlightfromCountry, invitedguests.FlightFromCity, invitedguests.FlightToCountry, invitedguests.FlightToCity, invitedguests.FlightNO, invitedguests.ArrivalDate, invitedguests.ArrivalTime, invitedguests.DepratureDate, invitedguests.DepratureTime, invitedguests.AirllineID, invitedguests.HotelID, invitedguests.ResponsiblePersonID, invitedguests.ArrivalTimeAMorPM, invitedguests.DepratureTimeAMorPM);
     if (endedSuccessfuly)
     {
         invitedguests.ID = autonumber;
     }
     return endedSuccessfuly;
 }