Ejemplo n.º 1
0
 public AddPreStuRelVM(int id)
 {
     preStuRel = new PreStuRel();
     foreach (var presences in entities.Presences)
     {
         preNamesList.Add(presences.PresenceID, presences.Name);
     }
     foreach (var student in entities.Students)
     {
         stuNamesList.Add(student.StudentID, student.Surname);
     }
 }
Ejemplo n.º 2
0
 public ActionResult AddPresence(FormCollection collection)
 {
     try
     {
         PreStuRel preStuRel = new PreStuRel();
         if (TryUpdateModel(preStuRel))
         {
             preStuRelRepository.AddPreStuRel(preStuRel);
             preStuRelRepository.Save();
             return RedirectToAction("Presences", new { id = preStuRel.StudentsID });
         }
         return View(preStuRel);
     }
     catch
     {
         return View();
     }
 }
Ejemplo n.º 3
0
 public void AddPreStuRel(PreStuRel preStuRel)
 {
     entities.PreStuRels.AddObject(preStuRel);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a new PreStuRel object.
 /// </summary>
 /// <param name="preStuRel1">Initial value of the PreStuRel1 property.</param>
 /// <param name="studentsID">Initial value of the StudentsID property.</param>
 /// <param name="presencesID">Initial value of the PresencesID property.</param>
 public static PreStuRel CreatePreStuRel(global::System.Int32 preStuRel1, global::System.Int32 studentsID, global::System.Int32 presencesID)
 {
     PreStuRel preStuRel = new PreStuRel();
     preStuRel.PreStuRel1 = preStuRel1;
     preStuRel.StudentsID = studentsID;
     preStuRel.PresencesID = presencesID;
     return preStuRel;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the PreStuRels EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPreStuRels(PreStuRel preStuRel)
 {
     base.AddObject("PreStuRels", preStuRel);
 }