Ejemplo n.º 1
0
        public JsonResult LoadDepartment(int?depID)
        {
            departmentFactory = new DepartmentFactorys();
            List <DAL.db.Department> list = departmentFactory.SearchDepartment(depID);
            var empList = list.Select(x => new { x.DepartmentID, x.DepartmentName });

            return(Json(empList, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public JsonResult DepartmentLists(int?DepartmentID)
        {
            result = new Result();

            DepartmentFactory = new DepartmentFactorys();
            List <DAL.db.Department> list = DepartmentFactory.SearchDepartment(DepartmentID);
            var deptList = list.Select(x => new { x.DepartmentID, x.DepartmentName });

            return(Json(deptList, JsonRequestBehavior.AllowGet));
        }