Esempio n. 1
0
        private void frmNhatKy_Load(object sender, EventArgs e)
        {
            #region Init GridView
            AppGridView.InitGridView(gridViewTaiKhoan, true, true, GridMultiSelectMode.RowSelect, false, false);
            AppGridView.ShowField(gridViewTaiKhoan, new string[] { "MaNhomQuyen", "HoTen", "TenDangNhap", "TenMayTinh", "PhienBan", "NgayDangNhap" },
                                  new string[] { "Nhóm quyền", "Họ tên", "Tên truy cập", "Tên máy tính", "Phiên bản", "Ngày đăng nhập" },
                                  new int[] { 200, 200, 150, 150, 100, 150 });
            //Attach Control to GridView
            AppGridView.RegisterControlField(gridViewTaiKhoan, "MaNhomQuyen", repositoryItemGridLookUpEditNhomQuyen);
            AppGridView.RegisterControlField(gridViewTaiKhoan, "NgayDangNhap", repositoryItemTextEditNgayDangNhap);
            AppGridView.ReadOnlyColumn(gridViewTaiKhoan, new string[] { "MaNhomQuyen", "HoTen", "TenDangNhap", "TenMayTinh", "PhienBan", "NgayDangNhap" });
            #endregion

            #region RepositoryItemGridLookUpEdit Nhom Quyen
            AppRepositoryItemGridLookUpEdit.InitRepositoryItemGridLookUp(repositoryItemGridLookUpEditNhomQuyen, true, TextEditStyles.Standard);
            AppRepositoryItemGridLookUpEdit.ShowField(repositoryItemGridLookUpEditNhomQuyen, new string[] { "TenNhomQuyen" }, new string[] { "Tên nhóm quyền" });
            repositoryItemGridLookUpEditNhomQuyen.ValueMember   = "MaNhomQuyen";
            repositoryItemGridLookUpEditNhomQuyen.DisplayMember = "TenNhomQuyen";
            repositoryItemGridLookUpEditNhomQuyen.NullText      = string.Empty;

            #endregion

            #region Init Datasource
            bindingSourceTaiKhoan.DataSource  = DataServices.TaiKhoan.GetAll();
            bindingSourceNhomQuyen.DataSource = DataServices.NhomQuyen.GetAll();
            #endregion
        }
Esempio n. 2
0
 private void frmXemNguoiDung_Load(object sender, EventArgs e)
 {
     AppGridView.InitGridView(gridViewNguoiDung, true, false, DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect, false, false);
     AppGridView.ShowField(gridViewNguoiDung, new string[] { "TenDangNhap", "Chon" }, new string[] { "Tên truy cập", "Chọn" }, new int[] { 250, 70 });
     AppGridView.ReadOnlyColumn(gridViewNguoiDung, new string[] { "TenDangNhap" });
     AppGridView.AlignHeader(gridViewNguoiDung, new string[] { "Chon" }, DevExpress.Utils.HorzAlignment.Center);
     AppGridView.UnSortField(gridViewNguoiDung, new string[] { "Chon" });
     InitData();
 }
Esempio n. 3
0
        private void frmPhanQuyenTaiKhoan_Load(object sender, EventArgs e)
        {
            AppGridView.InitGridView(gridViewPhanQuyenTaiKhoan, true, true, DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect, true, false);
            AppGridView.ShowField(gridViewPhanQuyenTaiKhoan, new string[] { "TenChucNang", "KhongDuocPhepCapNhat" }
                                  , new string[] { "Tên chức năng", "Không được phép cập nhật" }, new int[] { 350, 150 });
            AppGridView.AlignHeader(gridViewPhanQuyenTaiKhoan, new string[] { "TenChucNang", "KhongDuocPhepCapNhat" }, DevExpress.Utils.HorzAlignment.Center);
            AppGridView.ReadOnlyColumn(gridViewPhanQuyenTaiKhoan, new string[] { "TenChucNang" });

            InitData();
        }
Esempio n. 4
0
 private void ShowFile()
 {
     AppGridView.InitGridView(gridViewTieuDe, true, false, DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect, false, false);
     AppGridView.ShowField(gridViewTieuDe, strIDColumns, strFieldColumns, iSizeColumns);
     AppGridView.ShowEditor(gridViewTieuDe, NewItemRowPosition.Top);
     AppGridView.AlignHeader(gridViewTieuDe, strIDColumns, DevExpress.Utils.HorzAlignment.Center);
     AppGridView.ReadOnlyColumn(gridViewTieuDe, new string[] { "IdFileName" });
     AppGridView.RegisterControlField(gridViewTieuDe, "IdFrom", repositoryItemCheckedComboBoxEditIdFrom);
     Load_IdFrom();
 }
        private void frmKhoaTaiKhoanGiangVien_Load(object sender, EventArgs e)
        {
            #region Init GridView
            AppGridView.InitGridView(gridViewKhoaTaiKhoan, true, true, DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect, true, true);
            AppGridView.ShowField(gridViewKhoaTaiKhoan, new string[] { "MaGiangVien", "MaQuanLy", "HoTen", "TenHocHam", "TenHocVi", "TenLoaiGiangVien", "TenDonVi", "KhoaTaiKhoan" }
                                  , new string[] { "Id", "Mã giảng viên", "Họ tên", "Học hàm", "Học vị", "Loại giảng viên", "Khoa - Đơn vị", "Khoá tài khoản" }
                                  , new int[] { 99, 90, 140, 100, 100, 100, 100, 100 });

            AppGridView.AlignHeader(gridViewKhoaTaiKhoan, new string[] { "MaGiangVien", "MaQuanLy", "HoTen", "TenHocHam", "TenHocVi", "TenLoaiGiangVien", "TenDonVi", "KhoaTaiKhoan" }, DevExpress.Utils.HorzAlignment.Center);
            AppGridView.HideField(gridViewKhoaTaiKhoan, new string[] { "MaGiangVien" });
            AppGridView.ReadOnlyColumn(gridViewKhoaTaiKhoan, new string[] { "MaGiangVien", "MaQuanLy", "HoTen", "TenHocHam", "TenHocVi", "TenLoaiGiangVien", "TenDonVi" });
            AppGridView.SummaryField(gridViewKhoaTaiKhoan, "MaQuanLy", "{0}", DevExpress.Data.SummaryItemType.Count);
            #endregion
            InitData();
        }