Exemplo n.º 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the SubBranches EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSubBranches(SubBranch subBranch)
 {
     base.AddObject("SubBranches", subBranch);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new SubBranch object.
 /// </summary>
 /// <param name="subBranchId">Initial value of the SubBranchId property.</param>
 /// <param name="branchId">Initial value of the BranchId property.</param>
 /// <param name="subBranchName">Initial value of the SubBranchName property.</param>
 /// <param name="isSupporting">Initial value of the IsSupporting property.</param>
 public static SubBranch CreateSubBranch(global::System.Int32 subBranchId, global::System.Int32 branchId, global::System.String subBranchName, global::System.Boolean isSupporting)
 {
     SubBranch subBranch = new SubBranch();
     subBranch.SubBranchId = subBranchId;
     subBranch.BranchId = branchId;
     subBranch.SubBranchName = subBranchName;
     subBranch.IsSupporting = isSupporting;
     return subBranch;
 }
Exemplo n.º 3
0
 public ActionResult SubBranchEdit(SubBranch subBranch, int id)
 {
     if (ModelState.IsValid)
     {
         db.SubBranches.Attach(subBranch);
         db.ObjectStateManager.ChangeObjectState(subBranch, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("SubBranchList", new { branchId = subBranch.BranchId });
     }
     SubBranchViewModel vm = new SubBranchViewModel();
     vm.SubBranch = subBranch;
     return View();
 }