예제 #1
0
 /// <summary>
 /// Returns arrangement from data reader.
 /// </summary>
 /// <param name="reader">Data reader.</param>
 /// <returns>Arrangement from data reader.</returns>
 private static Arrangement GetArrangementDataFromReader(IDataReader reader)
 {
     Arrangement details = new Arrangement();
     details.ID = (int)reader["ID"];
     details.Name = (string)reader["Name"];
     details.Description = reader["Description"] == DBNull.Value
                               ? null
                               : (string)reader["Description"];
     details.ConferenceHallID = (int)reader["ConferenceHallID"];
     details.TimeBegin = (DateTime)reader["TimeBegin"];
     details.TimeEnd = (DateTime)reader["TimeEnd"];
     details.ListOfGuests = reader["ListOfGuests"] == DBNull.Value
                               ? null
                               : (string)reader["ListOfGuests"];
     details.Equipment = reader["Equipment"] == DBNull.Value
                               ? null
                               : (string)reader["Equipment"];
     return details;
 }
예제 #2
0
        public XMLSerializableArrangement(Arrangement arr)
        {
            if ((arr == null)||(!arr.ID.HasValue))
                throw new ArgumentNullException("arr");

            this.ArrangementID = arr.ID.Value;
            this.Name = arr.Name;
            this.Description = arr.Description;
            this.ConferenceHallID = arr.ConferenceHallID;
            this.ConferenceHallName = arr.ConferenceHallName;
            this.OfficeID = arr.OfficeID;
            this.OfficeName = arr.OfficeName;
            this.TimeBegin = arr.TimeBegin;
            this.TimeEnd = arr.TimeEnd;
            this.ListOfGuests = arr.ListOfGuests;
            this.Equipment = arr.Equipment;
        }