Esempio n. 1
0
 public VMNotification(VMLeaveCard f)
 {
     UserId           = f.UserId;
     TimeStamp        = f.TimeStamp;
     IsSeen           = f.IsSeen;
     Title            = f.Title;
     Description      = f.Description;
     URL              = f.URL;
     Sender           = f.Sender;
     NotificationType = NotificationType.LeaveCard;
     SenderId         = f.SenderId;
 }
 public VMNotification(VMLeaveCard f)
 {
     UserId = f.UserId;
     TimeStamp = f.TimeStamp;
     IsSeen = f.IsSeen;
     Title = f.Title;
     Description = f.Description;
     URL = f.URL;
     Sender = f.Sender;
     NotificationType = NotificationType.LeaveCard;
     SenderId = f.SenderId;
 }
 public ActionResult LeaveCard(VMLeaveCard c)
 {
     if (ModelState.IsValid)
     {
         Notification test = Translator.NotificationFromVMNotification(new VMNotification(c));
         DAL.addNotification(Translator.NotificationFromVMNotification(new VMNotification(c)), c.UserId);
         return RedirectToAction("Account", "User", new { id = c.UserId});
     }
     else
     {
         return View();
     }
 }