Пример #1
0
        public ActionResult Add_Paper(List <CheckModelPaper> list)
        {
            DataModelContext db = new DataModelContext();
            List <Paper>     l  = new List <Paper>();

            foreach (var i in list)
            {
                Paper p;
                if (i.check == true)
                {
                    p      = db.Papers.SingleOrDefault(x => x.Id == i.Id);
                    p.exam = db.Exams.Find(Session["eid"]);
                }
            }
            db.SaveChanges();
            return(RedirectToAction("Add_Paper"));
        }
Пример #2
0
 Subject_Work()
 {
     s  = new Subject();
     db = new DataModelContext();
 }
Пример #3
0
        public ActionResult Check()
        {
            DataModelContext db = new DataModelContext();

            return(View());
        }
Пример #4
0
 Branch_Work()
 {
     b  = new Branch();
     db = new DataModelContext();
 }