예제 #1
0
 public ActionResult Create(Staff Staf)
 {
     ViewBag.Braninfro = RealState.Branchs;
     RealState.Staffs.Add(Staf);
     RealState.SaveChanges();
     return(RedirectToAction("Index"));
 }
예제 #2
0
 public ActionResult Create(Rent Rentes)
 {
     ViewBag.Rents = new SelectList(RealState.Owners, "OwnerNo", "Address");
     ViewBag.Stafs = new SelectList(RealState.Staffs, "StaffNo", "Position");
     ViewBag.Bran  = new SelectList(RealState.Branchs, "BranchNo", "Street");
     RealState.Rents.Add(Rentes);
     RealState.SaveChanges();
     return(RedirectToAction("Index"));
 }
예제 #3
0
 public ActionResult Create(Owner Owns)
 {
     RealState.Owners.Add(Owns);
     RealState.SaveChanges();
     return(RedirectToAction("Index"));
 }
예제 #4
0
 public ActionResult Create(Branch Branches)
 {
     RealState.Branchs.Add(Branches);
     RealState.SaveChanges();
     return(RedirectToAction("Index"));
 }
 /// <summary>
 /// Updates the specified t.
 /// </summary>
 /// <param name="t">The t.</param>
 public virtual void Update(T t)
 {
     _context.Entry(t).State = EntityState.Modified;
     _context.SaveChanges();
 }