Beispiel #1
0
        public JsonResult TeacherBind(int departmentId)
        {
            DataSet ds = assignGateway.GetAllTeacher(departmentId);

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

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

            return(Json(teacherList, JsonRequestBehavior.AllowGet));
        }
Beispiel #2
0
 public dynamic GetAllTeacher()
 {
     return(anCourseAssignGateway.GetAllTeacher());
 }