public static string[] LayNoiDungVanBan(VanBanDto vb) { ArrayList danh_sach_noi_dung_doan_van = new ArrayList(); foreach (DoanVanDto dv in vb.DanhSachDoanVan) { string nd = dv.NoiDung; danh_sach_noi_dung_doan_van.Add(nd); } string[] kq = (string[])danh_sach_noi_dung_doan_van.ToArray(typeof(string)); return kq; }
public static VanBanDto Khoi_Tao(XmlElement nut) { VanBanDto kq = new VanBanDto(); kq.TieuDe = nut.GetAttribute("TieuDe"); kq.PhuDe = nut.GetAttribute("PhuDe"); kq.AmThanh = nut.GetAttribute("AmThanh"); kq.DanhSachDoanVan = new ArrayList(); foreach (XmlElement nut_con in nut.ChildNodes) { kq.DanhSachDoanVan.Add(DoanVanDao.Khoi_Tao(nut_con)); } return kq; }
public static VanBanDto LayVanBanTheoTieuDe(string filename, string tieude) { VanBanDto kq = new VanBanDto(); XmlDocument tai_lieu = LT_XML.Doc(filename); XmlNodeList danh_sach_van_ban = tai_lieu.GetElementsByTagName("VANBAN"); foreach (XmlElement vb in danh_sach_van_ban) { if (vb.GetAttribute("TieuDe") == tieude) { kq = Khoi_Tao(vb); break; } } return kq; }