/// <summary> /// Creates an appointment. /// </summary> /// <param name="classId"></param> /// <param name="objectId"></param> /// <param name="label"></param> /// <param name="occurs"></param> /// <param name="durationMinutes">Negative minutes are transformed to zero.</param> /// <param name="details"></param> protected Appointment(ClassId classId, ObjectId objectId, String label, DateTime occurs, int durationMinutes, String details) : base(classId, objectId, label) { mStarts = new DateTime(occurs); mDurationMinutes = durationMinutes; mDetails = details; mContacts = new Relation1M <Contact>(); }
/// <summary> /// Saves Contacts in memory to persistent storage. /// </summary> protected void SaveContacts(PeriodicAppointment appointment, VariableLengthRecord record) { Relation1M <Contact> contacts = appointment.GetContacts(); record.AppendValue(contacts.GetChildCount()); //#4 //might be a 0 for (int contactIndex = 0; contactIndex < contacts.GetChildCount(); ++contactIndex) { record.AppendValue(contacts.GetChild(contactIndex).GetObjectId()); //#5 - N } }
/// <summary> /// Initializes a ReminderCreator. /// </summary> public ReminderCreator() : base(new ClassId("Reminder")) { mReminders = new Relation1M <Reminder>(); }
/// <summary> /// Initializes a PeriodicAppointmentCreator. /// </summary> public PeriodicAppointmentCreator() : base(new ClassId("PeriodicAppointment")) { mPeriodicAppointments = new Relation1M <PeriodicAppointment>(); }
/// <summary> /// Initializes a ContactCreator. /// </summary> public ContactCreator() : base(new ClassId("Contact")) { mContacts = new Relation1M <Contact>(); }
/// <summary> /// Initializes an AppointmentCreator. /// </summary> public AppointmentCreator() : base(new ClassId("Appointment")) { mAppointments = new Relation1M <Appointment>(); }