Exemplo n.º 1
0
 public static string[] LayNoiDungCauHoi(BaiTapDto bt)
 {
     ArrayList myList = new ArrayList();
     foreach (CauHoiTuLuanDto ch in bt.DanhSachCauHoiTuLuan)
     {
         string nd = ch.NoiDung;
         myList.Add(nd);
     }
     string[] danh_sach_cau_hoi = (string[])myList.ToArray(typeof(string));
     return danh_sach_cau_hoi;
 }
Exemplo n.º 2
0
        public static BaiTapDto Khoi_Tao(XmlElement nut)
        {
            BaiTapDto kq = new BaiTapDto();
            kq.SoTT = int.Parse(nut.GetAttribute("SoThuTu"));
            kq.DanhSachCauHoiTuLuan = new ArrayList();
            foreach (XmlElement nut_con in nut.ChildNodes)
            {
                CauHoiTuLuanDto chtl = CauHoiTuLuanDao.Khoi_tao(nut_con);
                kq.DanhSachCauHoiTuLuan.Add(chtl);
            }

            return kq;
        }