Ejemplo n.º 1
0
        private void InitVal()
        {
            gridControl1.DataSource = LinhKien_DAL.getAll_LinhKien();

            gridThaoTac = new GridHelper <LinhKien_View>(gridControl1);
            gridThaoTac.Mapping("MaThuongHieu", ThuongHieu_DAL.getAll_ThuongHieu());
            gridThaoTac.Mapping("MaNhaCungCap", NhaCungCap_DAL.getAll_NhaCungCap());
            gridThaoTac.Mapping("MaDonViTinh", DonViTinh_DAL.getAll_DonViTinh());
            count_row = 0;
        }
Ejemplo n.º 2
0
        void Load_ComboBox_DonViTinh()
        {
            listDonViTinh = new List <DonViTinh_View>();

            listDonViTinh = DonViTinh_DAL.getAll_DonViTinh();

            ComboBoxItemCollection items = cbDonViTinh.Properties.Items;

            items.BeginUpdate();

            try
            {
                for (int i = 0; i < listDonViTinh.Count; i++)
                {
                    items.Add(listDonViTinh[i].TenDonViTinh.ToString());
                }
            }
            finally
            {
                items.EndUpdate();
            }
            cbDonViTinh.Properties.AutoComplete = true;
        }