Beispiel #1
0
        public ActionResult AddEmployee(int specialtyId)
        {
            Specialty specialty   = Specialty.Find(specialtyId);
            Employee  newEmployee = Employee.Find(Int32.Parse(Request.Form["employee-id"]));

            specialty.AddEmployee(newEmployee);
            return(RedirectToAction("Index"));
        }
        public ActionResult AddEmployeeToSpecialty(int specialtiesId)
        {
            Specialty specialty = Specialty.Find(specialtiesId);
            Employee  employee  = Employee.Find(int.Parse(Request.Form["employee-id"]));

            specialty.AddEmployee(employee);
            return(RedirectToAction("Details", new { id = specialtiesId }));
        }