Exemplo n.º 1
0
        public ActionResult Create([Bind(Include = "ClassGroupe_id,GroupeName,Grade_id")] ClassGroupViewModels classGroupViewModels)
        {
            if (ModelState.IsValid)
            {
                logic.AddClassGroup(classGroupViewModels);
                return(RedirectToAction("Index"));
            }

            ViewBag.Grade_id = new SelectList(db.Grades, "Grade_id", "GradeName", classGroupViewModels.Grade_id);
            return(View(classGroupViewModels));
        }
Exemplo n.º 2
0
        public void AddClassGroup(ClassGroupViewModels model)
        {
            ClassGroupe grp = new ClassGroupe
            {
                ClassGroupe_id = model.ClassGroupe_id,
                GroupeName     = model.GroupeName,
                Grade_id       = model.Grade_id,
            };

            uow.Repository <ClassGroupe>().Insert(grp);
            uow.Save();
        }
Exemplo n.º 3
0
 public void UpdateClassGroup(ClassGroupViewModels model)
 {
     throw new NotImplementedException();
 }