示例#1
0
 public ActionResult Edit(ImpactLevel level)
 {
     if (ModelState.IsValid)
     {
         db.ImpactLevels.Attach(level);
         db.ObjectStateManager.ChangeObjectState(level, EntityState.Modified);
         db.SaveChanges();
         UpdateImpactLevelMoneyValues();
         return RedirectToAction("Index");
     }
     return View(level);
 }
示例#2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ImpactLevels EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToImpactLevels(ImpactLevel impactLevel)
 {
     base.AddObject("ImpactLevels", impactLevel);
 }
示例#3
0
 /// <summary>
 /// Create a new ImpactLevel object.
 /// </summary>
 /// <param name="impactLevelId">Initial value of the ImpactLevelId property.</param>
 /// <param name="impactLevelName">Initial value of the ImpactLevelName property.</param>
 /// <param name="pctMin">Initial value of the PctMin property.</param>
 /// <param name="pctMax">Initial value of the PctMax property.</param>
 /// <param name="moneyMin">Initial value of the MoneyMin property.</param>
 /// <param name="moneyMax">Initial value of the MoneyMax property.</param>
 public static ImpactLevel CreateImpactLevel(global::System.Int32 impactLevelId, global::System.String impactLevelName, global::System.Int32 pctMin, global::System.Int32 pctMax, global::System.Decimal moneyMin, global::System.Decimal moneyMax)
 {
     ImpactLevel impactLevel = new ImpactLevel();
     impactLevel.ImpactLevelId = impactLevelId;
     impactLevel.ImpactLevelName = impactLevelName;
     impactLevel.PctMin = pctMin;
     impactLevel.PctMax = pctMax;
     impactLevel.MoneyMin = moneyMin;
     impactLevel.MoneyMax = moneyMax;
     return impactLevel;
 }