Esempio n. 1
0
        public JsonResult CourseBind(int departmentId)
        {
            DataSet ds = assignGateway.GetAllCourse(departmentId);

            List <SelectListItem> courseList = new List <SelectListItem>();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                courseList.Add(new SelectListItem {
                    Text = dr["Code"].ToString(), Value = dr["Id"].ToString()
                });
            }

            return(Json(courseList, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
 public dynamic GetAllCourse()
 {
     return(anCourseAssignGateway.GetAllCourse());
 }