Ejemplo n.º 1
0
        public void loadSupplier()
        {
            // lấy khu vực
            List <KhuVuc> listKhuVuc = new List <KhuVuc>();

            listKhuVuc = khuVucBus.getKhuVuc();

            for (int i = 0; i < listKhuVuc.Count; i++)
            {
                List <SupplierDTO> listSupplier = new List <SupplierDTO>();
                listSupplier = supplierBUS.getSupplierFromNCC(listKhuVuc[i].MaKV);

                TreeListNode prarentNode = treeSupplier.AppendNode(null, null);
                prarentNode.SetValue("MaNCC", listKhuVuc[i].TenKV);

                for (int j = 0; j < listSupplier.Count; j++)
                {
                    TreeListNode childnode1 = null;
                    childnode1 = treeSupplier.AppendNode(null, prarentNode);

                    childnode1.SetValue("MaNCC", listSupplier[j].MaNCC);
                    childnode1.SetValue("TenNCC", listSupplier[j].TenNCC);
                    childnode1.SetValue("NguoiLH", listSupplier[j].NguoiLienHe);
                    childnode1.SetValue("DiaChi", listSupplier[j].DiaChi);
                    childnode1.SetValue("DienThoai", listSupplier[j].DienThoai);
                    childnode1.SetValue("DiDong", listSupplier[j].DiDong);
                    childnode1.SetValue("Fax", listSupplier[j].Fax);
                    childnode1.SetValue("ChucVu", listSupplier[j].ChucVu);
                    childnode1.SetValue("Active", listSupplier[j].Active);
                }
            }
        }