コード例 #1
0
        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));
        }
コード例 #2
0
 public ActionResult FireEmployee(int id, EmployeeVendorViewModel vm)
 {
     VendorEmployeeManager.Delete(id);
     TempData["Message"] = "Employee has been fired";
     return(RedirectToAction("GetEmployees", "Vendor"));
 }