示例#1
0
 public ActionResult Edit(ProbLevel level)
 {
     if (ModelState.IsValid)
     {
         db.ProbLevels.Attach(level);
         db.ObjectStateManager.ChangeObjectState(level, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(level);
 }
示例#2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ProbLevels EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProbLevels(ProbLevel probLevel)
 {
     base.AddObject("ProbLevels", probLevel);
 }
示例#3
0
 /// <summary>
 /// Create a new ProbLevel object.
 /// </summary>
 /// <param name="probLevelId">Initial value of the ProbLevelId property.</param>
 /// <param name="probLevelName">Initial value of the ProbLevelName property.</param>
 /// <param name="pctMin">Initial value of the PctMin property.</param>
 /// <param name="pctMax">Initial value of the PctMax property.</param>
 public static ProbLevel CreateProbLevel(global::System.Int32 probLevelId, global::System.String probLevelName, global::System.Int32 pctMin, global::System.Int32 pctMax)
 {
     ProbLevel probLevel = new ProbLevel();
     probLevel.ProbLevelId = probLevelId;
     probLevel.ProbLevelName = probLevelName;
     probLevel.PctMin = pctMin;
     probLevel.PctMax = pctMax;
     return probLevel;
 }