public ActionResult Create(CustomerSpecialStatus customerspecialstatus) { if (ModelState.IsValid) { db.tabCustomerSpecialStatus.Add(customerspecialstatus); db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.CustomerId = new SelectList(db.tabCustomers, "CustomerId", "FirstName", customerspecialstatus.CustomerId); return View(customerspecialstatus); }
public ActionResult Edit(CustomerSpecialStatus customerspecialstatus) { if (ModelState.IsValid) { db.Entry(customerspecialstatus).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.CustomerId = new SelectList(db.tabCustomers, "CustomerId", "FirstName", customerspecialstatus.CustomerId); return View(customerspecialstatus); }