Example #1
0
        protected override void BeforeUpdate(DataRow dr)
        {
            BeforeChange("Subject", dr);

            atriumDB.AppointmentRow apptRow = (atriumDB.AppointmentRow)dr;

            if (!apptRow.IsIntervalNull())
            {
                officeDB.OfficerRow workingas = myA.AtMng.WorkingAsOfficer;
                foreach (atriumDB.AttendeeRow att in apptRow.GetAttendeeRows())
                {
                    if (att.ContactId == workingas.OfficerId || att.RowState == DataRowState.Added)
                    {
                        att.Interval            = apptRow.Interval;
                        att.NotificationDismiss = false;
                    }
                }
            }

            //if (!apptRow.IsApptRecurrenceIdNull() && apptRow.OriginalRecurrence == true)
            //{
            //    apptRow.ApptRecurrenceRow.updateDate = DateTime.Now;
            //}
            if (!apptRow.IsApptRecurrenceIdNull())
            {
                if (apptRow.ApptRecurrenceRow.RecurrenceRemoved)
                {
                    apptRow.ApptRecurrenceRow.Delete();
                    apptRow.SetApptRecurrenceIdNull();
                    myA.DB.ApptRecurrence.AcceptChanges();
                }
            }
        }