public JsonResult GetListStudied(string subjectcode, string coursecode) { COURSESTUDIED_BUS bus = new COURSESTUDIED_BUS(); List <string> listStudiedCode = new List <string>(); List <fieldpara> lipa = new List <fieldpara>(); lipa.Add(new fieldpara("COURSECODE", coursecode, 0)); if (!string.IsNullOrEmpty(subjectcode)) // có cái này hay ko ko quan trọng lắm { lipa.Add(new fieldpara("SUBJECTCODE", subjectcode, 0)); } var data = bus.getAllBy2("CODE", lipa.ToArray()); foreach (var item in data) { listStudiedCode.Add(item.SUBJECTCONTENTCODE); } return(Json(new { data = data, listStudiedCode = listStudiedCode }, JsonRequestBehavior.AllowGet)); }