Ejemplo n.º 1
0
        public void LoadKhachHang()
        {
            List <CustomerDTO> listCustomer = new List <CustomerDTO>();
            List <KhuVuc>      listKhuVuc   = new List <KhuVuc>();

            listKhuVuc = khuVucBus.getKhuVuc();
            for (int i = 0; i < listKhuVuc.Count; i++)
            {
                TreeListNode prarentNode = treeListKH.AppendNode(null, null);
                prarentNode.SetValue("MaKH", listKhuVuc[i].TenKV);
                listCustomer = cusBUS.getDataCustomer(listKhuVuc[i].MaKV);
                for (int j = 0; j < listCustomer.Count; j++)
                {
                    TreeListNode childnode1 = null;
                    childnode1 = treeListKH.AppendNode(null, prarentNode);
                    childnode1.SetValue("MaKH", listCustomer[j].MaKV);
                    childnode1.SetValue("MaKH", listCustomer[j].MaKH);
                    childnode1.SetValue("TenKH", listCustomer[j].TenKH);
                    childnode1.SetValue("NguoiLienHe", listCustomer[j].NguoiLienHe);
                    childnode1.SetValue("DiaChi", listCustomer[j].DiaChi);
                    childnode1.SetValue("DienThoai", listCustomer[j].DienThoai);
                    childnode1.SetValue("DiDong", listCustomer[j].DiDong);
                    childnode1.SetValue("Email", listCustomer[j].Email);
                    childnode1.SetValue("Website", listCustomer[j].Website);
                    childnode1.SetValue("Fax", listCustomer[j].Fax);
                    childnode1.SetValue("MaSoThue", listCustomer[j].MaSoThue);
                }
            }
        }
Ejemplo n.º 2
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);
                }
            }
        }