//得到班级信息 public String getClassInfo(String ClassInt, String Inst) { Maticsoft.BLL.班级表 banjiSQL = new Maticsoft.BLL.班级表(); System.Data.DataSet banjiinfo = new System.Data.DataSet(); banjiinfo = banjiSQL.GetList("专业='" + ClassInt + "'and 学院='" + Inst + "'"); // zhuanyeinfo=zhuanyeSQL.GetList("学院='"+ +"'") String ReturnJson = JsonConvert.SerializeObject(banjiinfo); return(ReturnJson); }
//得到班级信息 public List <object> GetClassInfo(string xueyuan, string zhuanye) { System.Data.DataSet banjiModle = new System.Data.DataSet(); Maticsoft.BLL.班级表 banjiOp = new Maticsoft.BLL.班级表(); banjiModle = banjiOp.GetList("专业='" + zhuanye + "'and 学院='" + xueyuan + "'"); var data = new List <object>(); int length = banjiModle.Tables["ds"].Rows.Count; for (int i = 0; i < length; i++) { data.Add( new { ClassId = banjiModle.Tables["ds"].Rows[i]["班级"], ClassName = banjiModle.Tables["ds"].Rows[i]["专业"].ToString() + banjiModle.Tables["ds"].Rows[i]["班级"].ToString() + "班", } ); } return(data); }