Esempio n. 1
0
        // GET: Employees/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Employee employee = employeeBusinessManager.GetById(id.Value);

            if (employee == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ManagerID  = new SelectList(employeeBusinessManager.GetAll(), "ID", "Name", employee.ManagerID);
            ViewBag.RoleID     = new SelectList(roleBusinessManager.GetAll(), "ID", "Name", employee.RoleID);
            ViewBag.WorkloadID = new SelectList(workloadbusinessManager.GetAll(), "ID", "Name", employee.WorkloadID);
            ViewBag.SkillLevel = new SelectList(skilllevelbusinessManager.GetAll(), "ID", "Name");
            ViewBag.Subsidiary = new SelectList(subsidiariesbusinessManager.GetAll(), "ID", "Name");
            return(View("Edit", employee));
        }
Esempio n. 2
0
 // GET: SkillLevels
 public ActionResult Index()
 {
     return(View(skilllevelBusinessManager.GetAll()));
 }