public new object Clone()
        {
            DataRow dr1 = this.Dr.Table.NewRow();

            dr1.ItemArray = this.Dr.ItemArray.Clone() as object[];
            if (dr1[MDB_ScheduleItem.Column_UniqueID] == null || dr1[MDB_ScheduleItem.Column_UniqueID] == DBNull.Value)
            {
                dr1[MDB_ScheduleItem.Column_UniqueID] = MDB_ScheduleDataProvider.GetNextID();
            }
            MDB_ScheduleItem item1 = new MDB_ScheduleItem(dr1);

            if (dr1[MDB_ScheduleItem.Column_RecurrenceRule].Equals(lastRecurrenceRule))
            {
                item1.recurrenceRuleID       = this.recurrenceRuleID;
                item1.dirtyFlagExplicitlySet = this.dirtyFlagExplicitlySet;
                item1.UniqueID = MDB_ScheduleDataProvider.GetNextID();
            }
            lastRecurrenceRule = dr1[MDB_ScheduleItem.Column_RecurrenceRule].ToString();
            return(item1);
        }
        public override void Remove(IScheduleAppointment item1)
        {
            base.Remove(item1);

            MDB_ScheduleItem item = item1 as MDB_ScheduleItem;

            if (item != null && item.RecurrenceRule.Length > 0)
            {
                if (MDB_ScheduleDataProvider.itemsToDelete == null)
                {
                    MDB_ScheduleDataProvider.itemsToDelete = new List <DataRow>();
                }
                foreach (DataRow dr in MDB_ScheduleDataProvider.scheduleDataSet.Tables[MDB_ScheduleDataProvider.Table_Appointments].Rows)
                {
                    if (dr.RowState != DataRowState.Deleted &&
                        dr.RowState != DataRowState.Detached &&
                        item.RecurrenceRule.Equals(dr[MDB_ScheduleItem.Column_RecurrenceRule]))
                    {
                        MDB_ScheduleDataProvider.itemsToDelete.Add(dr);
                    }
                }
            }
        }