public ActionResult AddGroup(Group model)
 {
     GroupsDbDataContext db = new GroupsDbDataContext();
     if (ModelState.IsValid)
     {
         Group gr = new Group();
         gr.Date = DateTime.Now;
         gr.GroupName = model.GroupName;
         gr.TypeId = model.TypeId;
         db.Groups.InsertOnSubmit(gr);
         db.SubmitChanges();
     }
     return RedirectToAction("Index");
 }
 //
 // GET: /Groups/
 public ActionResult Index([DataSourceRequest(Prefix = "Grid")]DataSourceRequest request)
 {
     var groups = new GroupsDbDataContext().Groups;
     return View(groups);
 }