Beispiel #1
0
 public IEnumerable <EmailData> GetReminderEmails()
 {
     using (var context = new SurveyDataContext())
     {
         var found = context.EmailData.Where(x => !x.IsViewed && (x.SentDate != DateTime.MinValue) && (x.SentDate <= DateTime.Today.AddDays(3))).ToList();
         return(found);
     }
 }
Beispiel #2
0
 public IEnumerable <EmailData> GetEmailsToSend()
 {
     using (var context = new SurveyDataContext())
     {
         var found = context.EmailData.Where(x => !x.IsViewed).ToList();
         return(found);
     }
 }
Beispiel #3
0
 public void SetSentDate(string email)
 {
     using (var context = new SurveyDataContext())
     {
         var found = context.EmailData.Where(x => x.EmailAddress == email).FirstOrDefault();
         if (found != null)
         {
             found.SentDate = DateTime.Today;
             context.SaveChanges();
         }
     }
 }
Beispiel #4
0
 public void SetStatus(string email)
 {
     using (var context = new SurveyDataContext())
     {
         var found = context.EmailData.Where(x => x.EmailAddress == email).FirstOrDefault();
         if (found != null)
         {
             found.IsViewed = true;
             context.SaveChanges();
         }
     }
 }
Beispiel #5
0
 public VendorAdminController(SurveyDataContext context)
 {
     _context = context;
 }
Beispiel #6
0
 public SurveyController(SurveyDataContext context)
 {
     _context = context;
 }
 public ResultsController(SurveyDataContext context)
 {
     _context = context;
 }
Beispiel #8
0
 public UserHelper(SurveyDataContext Context)
 {
     context = Context;
 }
Beispiel #9
0
 public UserAdminController(SurveyDataContext context)
 {
     _context = context;
 }