Esempio n. 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the SubDivs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSubDivs(SubDiv subDiv)
 {
     base.AddObject("SubDivs", subDiv);
 }
Esempio n. 2
0
 /// <summary>
 /// Create a new SubDiv object.
 /// </summary>
 /// <param name="subDivId">Initial value of the SubDivId property.</param>
 /// <param name="divisionId">Initial value of the DivisionId property.</param>
 /// <param name="subDivName">Initial value of the SubDivName property.</param>
 /// <param name="isSupporting">Initial value of the IsSupporting property.</param>
 public static SubDiv CreateSubDiv(global::System.Int32 subDivId, global::System.Int32 divisionId, global::System.String subDivName, global::System.Boolean isSupporting)
 {
     SubDiv subDiv = new SubDiv();
     subDiv.SubDivId = subDivId;
     subDiv.DivisionId = divisionId;
     subDiv.SubDivName = subDivName;
     subDiv.IsSupporting = isSupporting;
     return subDiv;
 }
Esempio n. 3
0
 public ActionResult SubDivEdit(SubDiv subDiv)
 {
     if (ModelState.IsValid)
     {
         db.SubDivs.Attach(subDiv);
         db.ObjectStateManager.ChangeObjectState(subDiv, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("SubDivList", new { divId = subDiv.DivisionId });
     }
     SubDivViewModel vm = new SubDivViewModel();
     vm.SubDiv = subDiv;
     return View(vm);
 }