Example #1
0
 /// <summary>
 /// Create a new Notification object.
 /// </summary>
 /// <param name="notificationId">Initial value of the NotificationId property.</param>
 /// <param name="laboratoryId">Initial value of the LaboratoryId property.</param>
 /// <param name="what">Initial value of the What property.</param>
 /// <param name="whin">Initial value of the Whin property.</param>
 /// <param name="whire">Initial value of the Whire property.</param>
 /// <param name="who">Initial value of the Who property.</param>
 /// <param name="time">Initial value of the Time property.</param>
 public static Notification CreateNotification(global::System.Int32 notificationId, global::System.Int32 laboratoryId, global::System.String what, global::System.String whin, global::System.String whire, global::System.String who, global::System.String time)
 {
     Notification notification = new Notification();
     notification.NotificationId = notificationId;
     notification.LaboratoryId = laboratoryId;
     notification.What = what;
     notification.Whin = whin;
     notification.Whire = whire;
     notification.Who = who;
     notification.Time = time;
     return notification;
 }
Example #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Notifications EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToNotifications(Notification notification)
 {
     base.AddObject("Notifications", notification);
 }
        public ActionResult Notification(itmmNotification model)
        {
            Notification a = new Notification();
              a.LaboratoryId = getLabId();
              a.What = model.what;
              a.Whin = model.whin;
              a.Whire = model.whire;
              a.Who = model.who;
              a.Time = model.time;

              con.AddToNotifications(a);
              con.SaveChanges();
              return RedirectToAction("Notification", "Head");
        }