public static List <EF.PointGeofenceNotification> LoadNotifications(int pointID) { GeoManagement client = new GeoManagement(); List <EF.PointGeofenceNotification> retVal = new List <EF.PointGeofenceNotification>(); retVal = client.GetPointGeofenceNotifications(pointID); return(retVal); }
private void AddNotification() { GeoManagement client = new GeoManagement(); EF.PointGeofenceNotification notification = new EF.PointGeofenceNotification(); notification.Description = txtNotificationTitle.Text; notification.Incoming = chkIncoming.Checked; notification.Outgoing = chkOutgoing.Checked; notification.IsEnabled = chkNotificationEnabled.Checked; #region Convert to an EF Week Active Period if (this.WeekActivePeriod.WeekActivePeriodId == Guid.Empty) { EF.WeekActivePeriod period = new EF.WeekActivePeriod(); period.WeekActivePeriodID = Guid.NewGuid(); period.Monday = this.WeekActivePeriod.Monday; period.Monday2 = this.WeekActivePeriod.MondaySecond; period.Tuesday = this.WeekActivePeriod.Tuesday; period.Tuesday2 = this.WeekActivePeriod.TuesdaySecond; period.Wednesday = this.WeekActivePeriod.Wednesday; period.Wednesday2 = this.WeekActivePeriod.WednesdaySecond; period.Thursday = this.WeekActivePeriod.Thursday; period.Thursday2 = this.WeekActivePeriod.ThursdaySecond; period.Friday = this.WeekActivePeriod.Friday; period.Friday2 = this.WeekActivePeriod.FridaySecond; period.Saturday = this.WeekActivePeriod.Saturday; period.Saturday2 = this.WeekActivePeriod.SaturdaySecond; period.Sunday = this.WeekActivePeriod.Sunday; period.Sunday2 = this.WeekActivePeriod.SundaySecond; notification.WeekActivePeriod = new EF.WeekActivePeriod(); notification.WeekActivePeriod.WeekActivePeriodID = client.AddWeekActivePeriod(period).WeekActivePeriodID; } #endregion client.AddPointGeofenceNotification(notification, PointID, CurrentRecipients); rgNotifications.Rebind(); }
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(); }
void rgNotifications_NeedDataSource(object sender, GridNeedDataSourceEventArgs e) { GeoManagement client = new GeoManagement(); this.rgNotifications.DataSource = client.GetPointGeofenceNotifications(this.PointID); }