public frmDanhMucMatHang()
 {
     im.Images.Add(QL_CuaHangNongSan.Properties.Resources.father_node);
     im.Images.Add(QL_CuaHangNongSan.Properties.Resources.child_node);
     InitializeComponent();
     danhMucHangHoa = dal.getDanhMuc();
     dsHangHoa      = dal.getHangHoa("");
     taiGridViewHangHoa();
     taiTreeViewNhomMatHang();
 }
        public frmHoaDon()
        {
            InitializeComponent();
            danhMucHangHoa = dalHoaDon.getDanhMuc();
            dsHangHoa      = dalHoaDon.getHangHoa("");
            taiGridViewHangHoa();
            taiTreeView();
            taiAutoCompleteText();
            cmbTienKhachDua.SelectedIndex = 0;
            ImageList im = new ImageList();

            im.Images.Add(QL_CuaHangNongSan.Properties.Resources.father_node);
            im.Images.Add(QL_CuaHangNongSan.Properties.Resources.child_node);
            treeView1.ImageList = im;
        }
 public void taiComBBNhomMathang()
 {
     try
     {
         cbbNhomMatHang.DataSource    = dal.getDanhMuc();
         cbbNhomMatHang.DisplayMember = "TENLOAI";
         cbbNhomMatHang.ValueMember   = "MALOAI";
         cbbNhomMatHang.SelectedIndex = 0;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }