public ActionResult Create(PrPermission prpermission)
        {
            ViewBag.prentry = null;
            if (ModelState.IsValid)
            {
                db.PrPermissions.AddObject(prpermission);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.entryid = new SelectList(db.PrEntries, "entryid", "name", prpermission.entryid);
            return View(prpermission);
        }
Esempio n. 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the PrPermissions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPrPermissions(PrPermission prPermission)
 {
     base.AddObject("PrPermissions", prPermission);
 }
Esempio n. 3
0
 /// <summary>
 /// Create a new PrPermission object.
 /// </summary>
 /// <param name="permid">Initial value of the permid property.</param>
 /// <param name="permstring">Initial value of the permstring property.</param>
 /// <param name="entryid">Initial value of the entryid property.</param>
 public static PrPermission CreatePrPermission(global::System.Int32 permid, global::System.String permstring, global::System.Int32 entryid)
 {
     PrPermission prPermission = new PrPermission();
     prPermission.permid = permid;
     prPermission.permstring = permstring;
     prPermission.entryid = entryid;
     return prPermission;
 }
 public ActionResult Edit(PrPermission prpermission)
 {
     if (ModelState.IsValid)
     {
         db.PrPermissions.Attach(prpermission);
         db.ObjectStateManager.ChangeObjectState(prpermission, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.entryid = new SelectList(db.PrEntries, "entryid", "name", prpermission.entryid);
     return View(prpermission);
 }