Example #1
0
 public void SendAssignmentReminder(Assignment assignment)
 {
     ViewData.Model = assignment;
     ViewBag.Host = FQDN;
     var mail = Populate(x =>
     {
         x.Subject = string.Format("Die Aufgabe »{0}« wird bald fällig", assignment.Title);
         x.ViewName = "AssignmentReminder";
         x.To.Add(assignment.Owner.EmailAddress);
     });
     mail.Send();
 }
Example #2
0
 public virtual Task SendNewAssignment(Assignment assignment)
 {
     ViewData.Model = assignment;
     ViewBag.Host = FQDN;
     var mail = Populate(x =>
     {
         x.Subject = string.Format("Neue Aufgabe »{0}« im ILK-Protokoll", assignment.Title);
         x.ViewName = "NewAssignment";
         x.To.Add(assignment.Owner.EmailAddress);
     });
     return mail.SendAsync();
 }
Example #3
0
 public void SendAssignmentOverdue(Assignment assignment)
 {
     ViewData.Model = assignment;
     ViewBag.Host = FQDN;
     var mail = Populate(x =>
     {
         x.Subject = string.Format("Die Aufgabe »{0}« ist überfällig!", assignment.Title);
         x.ViewName = "AssignmentOverdue";
         x.To.Add(assignment.Owner.EmailAddress);
     });
     mail.Send();
 }
Example #4
0
 public static Assignment FromViewModel(AssignmentEdit vm)
 {
     var a = new Assignment();
     a.IncorporateUpdates(vm);
     a.IsDone = false;
     a.ReminderSent = false;
     return a;
 }