Exemplo n.º 1
0
        public ActionResult Edit(int id)
        {
            ViewBag.id = id;
            var allDeparts = DepartmentManager.GetAllDbRecords();

            allDeparts.Insert(0, new Department {
                ID = 0, Name = "<根部门>"
            });
            ViewBag.AllDepartments = allDeparts;
            var model = DepartmentManager.GetDbRecord(id);

            return(PartialView(model));
        }