示例#1
0
 public ActionResult Create([Bind(Include = "SenderID,ReceiverID,Subject,Message,Alert,PushNotification,AlertDate")] Note note)
 {
     db.CreateNote(note.SenderID, note.ReceiverID, note.Subject, note.Message, note.Alert, note.PushNotification, note.AlertDate);
     ViewBag.SenderID   = new SelectList(db.Users, "UserID", "Username", note.SenderID);
     ViewBag.ReceiverID = new SelectList(db.Users, "UserID", "Username", note.ReceiverID);
     return(RedirectToAction("Received"));
 }