Exemple #1
0
        /// <summary>
        /// SendNotification
        /// </summary>
        /// <param name="spotImageId"></param>
        public void SendNotification(string imagePath)
        {
            var    spotImage = context.SpotImages.Where(@w => @w.ImagePath.Contains(imagePath)).First();
            var    ev        = context.Events.Where(@w => @w.SpotImageId == spotImage.Id).First();
            var    ward      = context.Wards.Where(@w => @w.Id == spotImage.WardId).First();
            var    zone      = context.Zones.Where(@w => @w.Id == ward.ZoneId).First();
            string topicName = zone.Name.Replace('"', ' ').Trim() + "-" + ward.Name.Replace('"', ' ').Trim();
            var    topic     = context.Topics.Where(@w => @w.Name == topicName).First();

            Auth.Provider provider = new Auth.Provider();
            provider.SendTopicNotification("EN", topic.Name, "[" + ev.Id.ToString() + "]ClearTrash Event: " + ev.EventName + " on " + ev.EventDate);

            spotImage.Verified = true;
            SubmitData();
        }
Exemple #2
0
 /// <summary>
 /// SendNonComplaintUserNotification
 /// </summary>
 public void SendNonComplaintUserNotification()
 {
     Auth.Provider provider = new Auth.Provider();
     provider.SendTopicNotification("NU", "ClearTrashVolunteers", "Please check your Users List updated for this week!");
 }
Exemple #3
0
 /// <summary>
 /// SendNonComplaintUserNotification
 /// </summary>
 public void SendNonComplaintUserNotification()
 {
     Auth.Provider provider = new Auth.Provider();
     provider.SendTopicNotification("NU", "ClearTrashVolunteers", "Please check your Users List updated for this week!");
 }