Exemple #1
0
        public void AddReminder(long id, string subject, string userID)
        {
            //Prompt user for a new reminder or open existing
            RemindersDataset.ReminderTableRow reminder = null;
            dlgReminder dlg = null;

            if (HasReminder(id, userID))
            {
                reminder = (RemindersDataset.ReminderTableRow) this.mReminders.ReminderTable.Select("IssueID=" + id + " AND UserID='" + userID + "'")[0];
                dlg      = new dlgReminder(reminder);
                dlg.ShowDialog();
            }
            else
            {
                reminder         = this.mReminders.ReminderTable.NewReminderTableRow();
                reminder.IssueID = id;
                reminder.Subject = subject;
                reminder.UserID  = userID;
                reminder.Message = "";
                reminder.Time    = DateTime.Now;
                dlg = new dlgReminder(reminder);
                if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    lock (this.mReminders) {
                        this.mReminders.ReminderTable.AddReminderTableRow(id, subject, userID, reminder.Time, reminder.Message);
                    }
                }
            }
        }
Exemple #2
0
 public void UpdateReminder(long id, string userID, DateTime time)
 {
     //Update an existing reminder
     lock (this.mReminders) {
         RemindersDataset.ReminderTableRow reminder = (RemindersDataset.ReminderTableRow) this.mReminders.ReminderTable.Select("IssueID=" + id + " AND UserID='" + userID + "'")[0];
         reminder.Time = time;
     }
 }
Exemple #3
0
 //Interface
 public dlgReminder(RemindersDataset.ReminderTableRow reminder)
 {
     //Constructor
     InitializeComponent();
     this.mReminder = reminder;
 }