コード例 #1
0
        public ActionResult AddStudentsToTables(itmmStudentsToTables a, int TableId)
        {
            var x = (from y in con.Tables
                     where y.TableId == TableId
                     select y).FirstOrDefault();
            x.StudentId = a.IdNumbers;
            con.SaveChanges();

               return RedirectToAction("Schedule");
        }
コード例 #2
0
        public ActionResult EditStudentsToTables(int TableId)
        {
            itmmStudentsToTables b = new itmmStudentsToTables();

            var x = (from y in con.Tables
                     where y.TableId == TableId
                     select y).FirstOrDefault();

            b.IdNumbers = x.StudentId;

            return View(b);
        }