public ActionResult FireEmployee(int id) { VendorEmployeeModel vm = VendorEmployeeManager.GetVendorEmployee(id); EmployeeVendorViewModel evvm = new EmployeeVendorViewModel(); evvm.User = UserManager.GetUser(vm.UserID); evvm.Vendor = VendorManager.GetVendor(vm.VendorID); return(View(evvm)); }
public ActionResult FireEmployee(int id, EmployeeVendorViewModel vm) { VendorEmployeeManager.Delete(id); TempData["Message"] = "Employee has been fired"; return(RedirectToAction("GetEmployees", "Vendor")); }