Exemplo n.º 1
0
        void btnAddNotification_Click(object sender, EventArgs e)
        {
            SetWeekActivePeriod();

            if (Page.IsValid)
            {
                if (this.btnAddNotification.Text == "Update Notification")
                {
                    UpdateNotification();
                }
                else
                {
                    AddNotification();
                }
            }

            this.txtContactDetail.Text          = String.Empty;
            this.txtNotificationName.Text       = String.Empty;
            this.txtNotificationTitle.Text      = String.Empty;
            this.chkNotificationEnabled.Checked = false;
            this.chkOutgoing.Checked            = false;
            this.chkIncoming.Checked            = false;
            CurrentRecipients.Clear();
            rgContacts.Rebind();
            this.btnAddNotification.Text = "Add Notification";
            this.WeekActivePeriod        = null;
            CLearWAP();
        }
Exemplo n.º 2
0
 void btnNotifications_Click(object sender, EventArgs e)
 {
     this.lblScreen.Text                 = "Notification";
     this.pvNotifications.Selected       = true;
     this.txtContactDetail.Text          = String.Empty;
     this.txtNotificationName.Text       = String.Empty;
     this.txtNotificationTitle.Text      = String.Empty;
     this.chkNotificationEnabled.Checked = false;
     this.chkOutgoing.Checked            = false;
     this.chkIncoming.Checked            = false;
     CurrentRecipients.Clear();
     rgContacts.Rebind();
     this.WeekActivePeriod = null;
     UpdateUIToWAP();
     CLearWAP();
     rgNotifications.Rebind();
 }
Exemplo n.º 3
0
        private void UpdateNotification()
        {
            GeoManagement client = new GeoManagement();

            EF.PointGeofenceNotification notification = client.GetPointGeofenceNotification(this.NotificationID);

            notification.WeekActivePeriod.Monday     = this.WeekActivePeriod.Monday;
            notification.WeekActivePeriod.Monday2    = this.WeekActivePeriod.MondaySecond;
            notification.WeekActivePeriod.Tuesday    = this.WeekActivePeriod.Tuesday;
            notification.WeekActivePeriod.Tuesday2   = this.WeekActivePeriod.TuesdaySecond;
            notification.WeekActivePeriod.Wednesday  = this.WeekActivePeriod.Wednesday;
            notification.WeekActivePeriod.Wednesday2 = this.WeekActivePeriod.WednesdaySecond;
            notification.WeekActivePeriod.Thursday   = this.WeekActivePeriod.Thursday;
            notification.WeekActivePeriod.Thursday2  = this.WeekActivePeriod.ThursdaySecond;
            notification.WeekActivePeriod.Friday     = this.WeekActivePeriod.Friday;
            notification.WeekActivePeriod.Friday2    = this.WeekActivePeriod.FridaySecond;
            notification.WeekActivePeriod.Saturday   = this.WeekActivePeriod.Saturday;
            notification.WeekActivePeriod.Saturday2  = this.WeekActivePeriod.SaturdaySecond;
            notification.WeekActivePeriod.Sunday     = this.WeekActivePeriod.Sunday;
            notification.WeekActivePeriod.Sunday2    = this.WeekActivePeriod.SundaySecond;
            client.UpdateWeekActivePeriod(notification.WeekActivePeriod);

            client.UpdatePointGeofenceNotification(this.NotificationID, txtNotificationTitle.Text, chkNotificationEnabled.Checked, chkIncoming.Checked, chkOutgoing.Checked, CurrentRecipients);

            this.txtContactDetail.Text          = String.Empty;
            this.txtNotificationName.Text       = String.Empty;
            this.txtNotificationTitle.Text      = String.Empty;
            this.chkNotificationEnabled.Checked = false;
            this.chkOutgoing.Checked            = false;
            this.chkIncoming.Checked            = false;
            CurrentRecipients.Clear();
            rgContacts.Rebind();

            rgNotifications.Rebind();

            this.WeekActivePeriod = null;
            CLearWAP();
        }