private void comboBox_loaiDK_SelectedValueChanged(object sender, EventArgs e) { KeyValuePair <string, LoaiDangKy> item = (KeyValuePair <string, LoaiDangKy>)comboBox_loaiDK.SelectedItem; String html = dkmh.getDanhSachDotDK(item.Value.hocKyID); DotDangKy[] d = XMLParser.getDSDotDangKy(html); html = dkmh.getLichDangKy(d[0].idDotDangKy, d[0].idDotDangKy); }
static void test2() { StreamReader sr = new StreamReader(MyBK.Lib.Data.PathData.config); String logined = sr.ReadLine(); if (logined == null) { sr.Close(); return; } String user = sr.ReadLine(); String pass = sr.ReadLine(); sr.Close(); MyBKDKMH dkmh = new MyBKDKMH(user, pass); String html = dkmh.getDanhSachLoaiDangKy(); LoaiDangKy[] l = MyBK.Lib.Parser.XMLParser.getDSLoaiDangKy(html); StreamWriter sw = new StreamWriter("log.html", false, Encoding.UTF8); sw.Write(html); LoaiDangKy li = null; for (int i = 0; i < l.Length; i++) { if (l[i].tenLoaiDK.IndexOf("Kết") >= 0) { sw.WriteLine(l[i].hocKyID + "\n" + l[i].tenLoaiDK); li = l[i]; } } html = dkmh.getDanhSachDotDK(li.hocKyID); DotDangKy[] d = XMLParser.getDSDotDangKy(html); html = dkmh.getLichDangKy(d[0].idDotDangKy, d[0].idDotDangKy); html = dkmh.getThongTinNhomLopMonHoc("14014"); sw.Write(html); sw.Close(); Console.WriteLine("Done"); }