Exemplo n.º 1
0
 public static long[] GetSelectedID(PLBandedGridView gridView, string IDField)
 {
     if (gridView.GetSelectedRows() != null)
     {
         long[] ids = new long[gridView.GetSelectedRows().Length];
         int i = 0;
         foreach (int index in gridView.GetSelectedRows())
         {
             if (index > -1)
             {
                 DataRow temp = gridView.GetDataRow(index);
                 ids[i++] = HelpNumber.ParseInt64(temp[IDField]);
             }
         }
         return ids;
     }
     return null;
 }
Exemplo n.º 2
0
 /// <summary>Lấy những dòng đã chọn trên GridView
 /// </summary>
 public List<DataRow> _getSelectedDatarowsOnGrid(PLBandedGridView gridView)
 {
     return PhieuQuanLyUtil.GetSelectedDataRow(gridView);
 }
Exemplo n.º 3
0
 public static List<DataRow> GetSelectedDataRow(PLBandedGridView gridView)
 {
     List<DataRow> rowList = new List<DataRow>();
     if (gridView.GetSelectedRows() != null)
     {
         foreach (int index in gridView.GetSelectedRows())
         {
             if (index > -1) rowList.Add(gridView.GetDataRow(index));
         }
     }
     return rowList;
 }
        public AppBienMucGridTemplate(PLBandedGridView gridViewMaster)
        {
            this.gridViewMaster = gridViewMaster;
            #region Declare

            CotMaBang = new BandedGridColumn();
            CotTietMuc = new BandedGridColumn();
            CotNoiDung = new BandedGridColumn();
            CotSoTap = new BandedGridColumn();
            CotTenTap = new BandedGridColumn();
            CotTongTap = new BandedGridColumn();
            CotSoBang = new BandedGridColumn();
            CotLoaiBang = new BandedGridColumn();
            CotThonSoLoaiBang = new BandedGridColumn();
            CotPostMaster = new BandedGridColumn();
            CotPopUp = new BandedGridColumn();
            CotSDKCBHD = new BandedGridColumn();
            CotTTDinhKem = new BandedGridColumn();
            CotTuKhoa = new BandedGridColumn();
            CotKHPL = new BandedGridColumn();
            CotKHXK = new BandedGridColumn();
            CotKe = new BandedGridColumn();
            CotNgan = new BandedGridColumn();
            CotTang = new BandedGridColumn();
            CotSoLanPhat = new BandedGridColumn();
            CotPhatLanDau = new BandedGridColumn();
            CotThoiHanBanQuyen = new BandedGridColumn();
            CotDonViSoHuu = new BandedGridColumn();
            CotDonViCungCap = new BandedGridColumn();
            CotNuoc = new BandedGridColumn();
            CotDoiTuongKhanGia = new BandedGridColumn();
            CotRating = new BandedGridColumn();
            //CotTimeCode_Betacam_In = new BandedGridColumn();
            //CotTimeCode_Beatacam_Out = new BandedGridColumn();
            //CotTimeCode_Beatacam_Dur = new BandedGridColumn();
            CotNgayNhap = new BandedGridColumn();
            CotNguoiNhap = new BandedGridColumn();
            CotPhongBan = new BandedGridColumn();
            //CotTimeCode_File_In = new BandedGridColumn();
            //CotTimeCode_File_Out = new BandedGridColumn();
            //CotTimeCode_File_Duration = new BandedGridColumn();
            CotGhiChu = new BandedGridColumn();
            CotNgayMuon = new BandedGridColumn();
            CotNgayTra = new BandedGridColumn();
            CotDoiTuongMuon = new BandedGridColumn();
            CotThongTinMuon = new BandedGridColumn();
            CotNoiLuuTru = new BandedGridColumn();
            CotTenGoc = new BandedGridColumn();
            CotNamSX = new BandedGridColumn();
            CotThoiLuong = new BandedGridColumn();
            CotThanhLy = new BandedGridColumn();

            gridBandThongTinChinh = new GridBand();
            gridBandThongTinMuonTra = new GridBand();
            gridBandNguonGoc = new GridBand();
            gridBandThongTinPhatSong = new GridBand();
            gridBandThongTinBetacam = new GridBand();
            gridBandThongTinHD = new GridBand();
            #endregion

            #region Init Grid

            gridViewMaster.Bands.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.GridBand[] {
            this.gridBandThongTinChinh,
            this.gridBandThongTinMuonTra,
            this.gridBandNguonGoc,
            this.gridBandThongTinPhatSong,
            this.gridBandThongTinBetacam,
            this.gridBandThongTinHD});
            gridViewMaster.Columns.AddRange(new DevExpress.XtraGrid.Views.BandedGrid.BandedGridColumn[] {
            this.CotNoiDung,
            this.CotTietMuc,
            this.CotMaBang,
            this.CotTenGoc,
            this.CotSoTap,
            this.CotTenTap,
            this.CotTongTap,
            this.CotThoiLuong,
            this.CotSoBang,
            this.CotLoaiBang,
            this.CotThonSoLoaiBang,
            this.CotPostMaster,
            this.CotPopUp,
            this.CotSDKCBHD,
            this.CotTTDinhKem,
            this.CotTuKhoa,
            this.CotKHPL,
            this.CotKHXK,
            this.CotKe,
            this.CotNgan,
            this.CotTang,
            this.CotSoLanPhat,
            this.CotPhatLanDau,
            this.CotThoiHanBanQuyen,
            this.CotDonViSoHuu,
            this.CotDonViCungCap,
            this.CotNamSX,
            this.CotNuoc,
            this.CotDoiTuongKhanGia,
            this.CotRating,
            //this.CotTimeCode_Betacam_In,
            //this.CotTimeCode_Beatacam_Out,
            //this.CotTimeCode_Beatacam_Dur,
            //this.CotTimeCode_File_In,
            //this.CotTimeCode_File_Out,
            //this.CotTimeCode_File_Duration,
            this.CotNgayNhap,
            this.CotNguoiNhap,
            this.CotPhongBan,
            this.CotGhiChu,
            this.CotThanhLy,
            this.CotNgayMuon,
            this.CotNgayTra,
            this.CotDoiTuongMuon,
            this.CotThongTinMuon,
            this.CotNoiLuuTru});
            gridViewMaster.GroupCount = 2;
            gridViewMaster.SortInfo.AddRange(new DevExpress.XtraGrid.Columns.GridColumnSortInfo[] {
            new DevExpress.XtraGrid.Columns.GridColumnSortInfo(this.CotNoiDung, DevExpress.Data.ColumnSortOrder.Ascending),
            new DevExpress.XtraGrid.Columns.GridColumnSortInfo(this.CotSoTap, DevExpress.Data.ColumnSortOrder.Ascending)});
            CotNoiDung.GroupIndex = 0;
            CotPostMaster.GroupIndex = 1;
            #endregion

            #region Init Column

            //
            // CotTenGoc
            //
            this.CotTenGoc.Caption = "Tên gốc";
            this.CotTenGoc.Name = "CotTenGoc";
            this.CotTenGoc.Width = 58;
            //
            // CotMaBang
            //
            this.CotMaBang.Caption = "Mã băng";
            this.CotMaBang.Name = "CotMaBang";
            this.CotMaBang.Width = 58;
            //
            // CotTietMuc
            //
            this.CotTietMuc.Caption = "Tiết mục";
            this.CotTietMuc.Name = "CotTietMuc";
            this.CotTietMuc.Width = 65;
            //
            // CotNoiDung
            //
            this.CotNoiDung.Caption = "Nội dung";
            this.CotNoiDung.Name = "CotNoiDung";
            this.CotNoiDung.Width = 67;
            //
            // CotSoTap
            //
            this.CotSoTap.Caption = "Tập số";
            this.CotSoTap.Name = "CotSoTap";
            this.CotSoTap.Width = 58;
            //
            // CotTenTap
            //
            this.CotTenTap.Caption = "Tên tập";
            this.CotTenTap.Name = "CotTenTap";
            this.CotTenTap.Width = 58;
            //
            // CotTongTap
            //
            this.CotTongTap.Caption = "Tổng tập";
            this.CotTongTap.Name = "CotTongTap";
            this.CotTongTap.Width = 58;
            //
            // CotThoiLuong
            //
            this.CotThoiLuong.Caption = "Thời lượng";
            this.CotThoiLuong.Name = "CotThoiLuong";
            this.CotThoiLuong.Width = 62;
            //
            // CotSoBang
            //
            this.CotSoBang.Caption = "Số băng";
            this.CotSoBang.Name = "CotSoBang";
            this.CotSoBang.Width = 58;
            //
            // CotLoaiBang
            //
            this.CotLoaiBang.Caption = "Loại lưu trữ";
            this.CotLoaiBang.Name = "CotLoaiBang";
            this.CotLoaiBang.Width = 67;
            //
            // CotThonSoLoaiBang
            //
            this.CotThonSoLoaiBang.Caption = "Thông số loại băng";
            this.CotThonSoLoaiBang.Name = "CotThonSoLoaiBang";
            this.CotThonSoLoaiBang.Width = 102;
            //
            // CotPostMaster
            //
            this.CotPostMaster.Caption = "Post/Master";
            this.CotPostMaster.Name = "CotPostMaster";
            this.CotPostMaster.Width = 61;
            //
            // CotPopUp
            //
            this.CotPopUp.Caption = "Pop Up";
            this.CotPopUp.Name = "CotPopUp";
            this.CotPopUp.Width = 58;
            //
            // CotKe
            //
            this.CotKe.Caption = "Kệ";
            this.CotKe.Name = "CotKe";
            this.CotKe.Width = 58;
            //
            // CotNgan
            //
            this.CotNgan.Caption = "Ngăn";
            this.CotNgan.Name = "CotNgan";
            this.CotNgan.Width = 58;
            //
            // CotTang
            //
            this.CotTang.Caption = "Tầng";
            this.CotTang.Name = "CotTang";
            this.CotTang.Width = 58;
            //
            // CotKHPL
            //
            this.CotKHPL.Caption = "KHPL";
            this.CotKHPL.Name = "CotKHPL";
            this.CotKHPL.ToolTip = "Ký hiệu phân loại";
            this.CotKHPL.Width = 36;
            //
            // CotKHXK
            //
            this.CotKHXK.Caption = "KHXK";
            this.CotKHXK.Name = "CotKHXK";
            this.CotKHXK.ToolTip = "Ký hiệu xếp kho";
            this.CotKHXK.Width = 37;
            //
            // CotTTDinhKem
            //
            this.CotTTDinhKem.Caption = "Thông tin đính kèm";
            this.CotTTDinhKem.Name = "CotTTDinhKem";
            this.CotTTDinhKem.Width = 102;
            //
            // CotTuKhoa
            //
            this.CotTuKhoa.Caption = "Từ khóa";
            this.CotTuKhoa.Name = "CotTuKhoa";
            this.CotTuKhoa.Width = 51;
            //
            // CotDoiTuongKhanGia
            //
            this.CotDoiTuongKhanGia.Caption = "Đối tượng khán giả";
            this.CotDoiTuongKhanGia.Name = "CotDoiTuongKhanGia";
            this.CotDoiTuongKhanGia.Width = 103;
            //
            // CotRating
            //
            this.CotRating.Caption = "Rating trung bình (%)";
            this.CotRating.Name = "CotRating";
            this.CotRating.Width = 117;
            //
            // CotNgayNhap
            //
            this.CotNgayNhap.Caption = "Ngày nhập";
            this.CotNgayNhap.Name = "CotNgayNhap";
            this.CotNgayNhap.Width = 64;
            //
            // CotNguoiNhap
            //
            this.CotNguoiNhap.Caption = "Người nhập";
            this.CotNguoiNhap.Name = "CotNguoiNhap";
            this.CotNguoiNhap.Width = 64;//
            // CotPhongBan
            //
            this.CotPhongBan.Caption = "Phòng ban";
            this.CotPhongBan.Name = "CotPhongBan";
            this.CotPhongBan.Width = 64;
            //
            // CotGhiChu
            //
            this.CotGhiChu.Caption = "Ghi chú";
            this.CotGhiChu.Name = "CotGhiChu";
            this.CotGhiChu.Width = 58;
            //
            // CotNgayMuon
            //
            this.CotNgayMuon.Caption = "Ngày mượn";
            this.CotNgayMuon.Name = "CotNgayMuon";
            this.CotNgayMuon.Width = 67;
            //
            // CotNgayTra
            //
            this.CotNgayTra.Caption = "Ngày trả";
            this.CotNgayTra.Name = "CotNgayTra";
            this.CotNgayTra.Width = 67;
            //
            // CotDoiTuongMuon
            //
            this.CotDoiTuongMuon.Caption = "Đối tượng mượn";
            this.CotDoiTuongMuon.Name = "CotDoiTuongMuon";
            this.CotDoiTuongMuon.Width = 90;
            //
            // CotThongTinMuon
            //
            this.CotThongTinMuon.Caption = "Thông tin mượn";
            this.CotThongTinMuon.Name = "CotThongTinMuon";
            this.CotThongTinMuon.Width = 87;
            //
            // CotNamSX
            //
            this.CotNamSX.Caption = "Năm SX";
            this.CotNamSX.Name = "CotNamSX";
            this.CotNamSX.Width = 48;
            //
            // CotDonViCungCap
            //
            this.CotDonViCungCap.Caption = "Đơn vị cung cấp";
            this.CotDonViCungCap.Name = "CotDonViCungCap";
            this.CotDonViCungCap.Width = 89;
            //
            // CotDonViSoHuu
            //
            this.CotDonViSoHuu.Caption = "Đơn vị sở hữu";
            this.CotDonViSoHuu.Name = "CotDonViSoHuu";
            this.CotDonViSoHuu.Width = 79;
            //
            // CotNuoc
            //
            this.CotNuoc.Caption = "Nước SX";
            this.CotNuoc.Name = "CotNuoc";
            this.CotNuoc.ToolTip = "Nước sản xuất";
            this.CotNuoc.Width = 52;
            //
            // CotThoiHanBangQuyen
            //
            this.CotThoiHanBanQuyen.Caption = "Thời hạn bản quyền";
            this.CotThoiHanBanQuyen.Name = "CotThoiHanBangQuyen";
            this.CotThoiHanBanQuyen.Width = 107;
            //
            // CotSoLanPhat
            //
            this.CotSoLanPhat.Caption = "Tồng số lần đã phát";
            this.CotSoLanPhat.Name = "CotSoLanPhat";
            this.CotSoLanPhat.Width = 107;
            //
            // CotPhatLanDau
            //
            this.CotPhatLanDau.Caption = "Ngày phát đầu tiên";
            this.CotPhatLanDau.Name = "CotPhatLanDau";
            this.CotPhatLanDau.ToolTip = "Những ngày phát lần đầu tương ứng trên các đài";
            this.CotPhatLanDau.Width = 104;
            //
            // CotTimeCode_Betacam_In
            ////
            //this.CotTimeCode_Betacam_In.Caption = "Timecode in (betacam)";
            //this.CotTimeCode_Betacam_In.Name = "CotTimeCode_Betacam_In";
            //this.CotTimeCode_Betacam_In.Width = 120;
            ////
            //// CotTimeCode_Beatacam_Out
            ////
            //this.CotTimeCode_Beatacam_Out.Caption = "Timecode out (betacam)";
            //this.CotTimeCode_Beatacam_Out.Name = "CotTimeCode_Beatacam_Out";
            //this.CotTimeCode_Beatacam_Out.Width = 128;
            ////
            //// CotTimeCode_Beatacam_Dur
            ////
            //this.CotTimeCode_Beatacam_Dur.Caption = "Timecode dur (betacam)";
            //this.CotTimeCode_Beatacam_Dur.Name = "CotTimeCode_Beatacam_Dur";
            //this.CotTimeCode_Beatacam_Dur.Width = 128;
            ////
            //// CotTimeCode_File_In
            ////
            //this.CotTimeCode_File_In.Caption = "Timecode in (file)";
            //this.CotTimeCode_File_In.Name = "CotTimeCode_File_In";
            //this.CotTimeCode_File_In.Width = 93;
            ////
            //// CotTimeCode_File_Out
            ////
            //this.CotTimeCode_File_Out.Caption = "Timecode out (file)";
            //this.CotTimeCode_File_Out.Name = "CotTimeCode_File_Out";
            //this.CotTimeCode_File_Out.Width = 101;
            ////
            //// CotTimeCode_File_Duration
            ////
            //this.CotTimeCode_File_Duration.Caption = "Timcode dur (file)";
            //this.CotTimeCode_File_Duration.Name = "CotTimeCode_File_Duration";
            //this.CotTimeCode_File_Duration.Width = 95;
            //
            // CotSDKCBHD
            //
            this.CotSDKCBHD.Caption = "Số ĐKCB HD";
            this.CotSDKCBHD.Name = "CotSDKCBHD";
            this.CotSDKCBHD.ToolTip = "Số đăng ký cá biệt ổ cứng";
            this.CotSDKCBHD.Width = 71;
            //
            // CotNoiLuuTru
            //
            this.CotNoiLuuTru.Caption = "Nơi lưu trữ";
            this.CotNoiLuuTru.FieldName = "CotNoiLuuTru";
            this.CotNoiLuuTru.Name = "CotNoiLuuTru";
            this.CotNoiLuuTru.Width = 63;
            //
            // CotThanhLy
            //
            this.CotThanhLy.Caption = "Thanh lý";
            this.CotThanhLy.Name = "CotThanhLy";
            #endregion

            #region Init Band
            //
            // gridBandThongTinChinh
            //
            this.gridBandThongTinChinh.AppearanceHeader.Options.UseTextOptions = true;
            this.gridBandThongTinChinh.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            this.gridBandThongTinChinh.Caption = "Thông tin chính";
            this.gridBandThongTinChinh.Columns.Add(this.CotNoiDung);
            this.gridBandThongTinChinh.Columns.Add(this.CotTenGoc);
            this.gridBandThongTinChinh.Columns.Add(this.CotMaBang);
            this.gridBandThongTinChinh.Columns.Add(this.CotTietMuc);
            this.gridBandThongTinChinh.Columns.Add(this.CotSoTap);
            this.gridBandThongTinChinh.Columns.Add(this.CotTenTap);
            this.gridBandThongTinChinh.Columns.Add(this.CotTongTap);
            this.gridBandThongTinChinh.Columns.Add(this.CotThoiLuong);
            this.gridBandThongTinChinh.Columns.Add(this.CotSoBang);
            this.gridBandThongTinChinh.Columns.Add(this.CotLoaiBang);
            this.gridBandThongTinChinh.Columns.Add(this.CotThonSoLoaiBang);
            this.gridBandThongTinChinh.Columns.Add(this.CotPostMaster);
            this.gridBandThongTinChinh.Columns.Add(this.CotPopUp);
            this.gridBandThongTinChinh.Columns.Add(this.CotKe);
            this.gridBandThongTinChinh.Columns.Add(this.CotNgan);
            this.gridBandThongTinChinh.Columns.Add(this.CotTang);
            this.gridBandThongTinChinh.Columns.Add(this.CotKHPL);
            this.gridBandThongTinChinh.Columns.Add(this.CotKHXK);
            this.gridBandThongTinChinh.Columns.Add(this.CotTTDinhKem);
            this.gridBandThongTinChinh.Columns.Add(this.CotTuKhoa);
            this.gridBandThongTinChinh.Columns.Add(this.CotDoiTuongKhanGia);
            this.gridBandThongTinChinh.Columns.Add(this.CotRating);
            this.gridBandThongTinChinh.Columns.Add(this.CotNgayNhap);
            this.gridBandThongTinChinh.Columns.Add(this.CotNguoiNhap);
            this.gridBandThongTinChinh.Columns.Add(this.CotPhongBan);
            this.gridBandThongTinChinh.Columns.Add(this.CotGhiChu);
            this.gridBandThongTinChinh.Columns.Add(this.CotThanhLy);
            this.gridBandThongTinChinh.Name = "gridBandThongTinChinh";
            this.gridBandThongTinChinh.Width = 58;
            //
            // gridBandThongTinMuonTra
            //
            this.gridBandThongTinMuonTra.AppearanceHeader.Options.UseTextOptions = true;
            this.gridBandThongTinMuonTra.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            this.gridBandThongTinMuonTra.Caption = "Thông tin mượn trả";
            this.gridBandThongTinMuonTra.Columns.Add(this.CotNgayMuon);
            this.gridBandThongTinMuonTra.Columns.Add(this.CotNgayTra);
            this.gridBandThongTinMuonTra.Columns.Add(this.CotDoiTuongMuon);
            this.gridBandThongTinMuonTra.Columns.Add(this.CotThongTinMuon);
            this.gridBandThongTinMuonTra.Name = "gridBandThongTinMuonTra";
            this.gridBandThongTinMuonTra.Width = 87;
            //
            // gridBandNguonGoc
            //
            this.gridBandNguonGoc.AppearanceHeader.Options.UseTextOptions = true;
            this.gridBandNguonGoc.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            this.gridBandNguonGoc.Caption = "Nguồn gốc";
            this.gridBandNguonGoc.Columns.Add(this.CotNamSX);
            this.gridBandNguonGoc.Columns.Add(this.CotDonViCungCap);
            this.gridBandNguonGoc.Columns.Add(this.CotDonViSoHuu);
            this.gridBandNguonGoc.Columns.Add(this.CotNuoc);
            this.gridBandNguonGoc.Columns.Add(this.CotThoiHanBanQuyen);
            this.gridBandNguonGoc.Name = "gridBandNguonGoc";
            this.gridBandNguonGoc.Width = 52;
            //
            // gridBandThongTinPhatSong
            //
            this.gridBandThongTinPhatSong.AppearanceHeader.Options.UseTextOptions = true;
            this.gridBandThongTinPhatSong.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            this.gridBandThongTinPhatSong.Caption = "Thông tin phát sóng";
            this.gridBandThongTinPhatSong.Columns.Add(this.CotSoLanPhat);
            this.gridBandThongTinPhatSong.Columns.Add(this.CotPhatLanDau);
            this.gridBandThongTinPhatSong.Name = "gridBandThongTinPhatSong";
            this.gridBandThongTinPhatSong.Width = 104;
            //
            // gridBandThongTinBetacam
            //
            this.gridBandThongTinBetacam.AppearanceHeader.Options.UseTextOptions = true;
            this.gridBandThongTinBetacam.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            this.gridBandThongTinBetacam.Caption = "Thông tin Timecode";
            //this.gridBandThongTinBetacam.Columns.Add(this.CotTimeCode_Betacam_In);
            //this.gridBandThongTinBetacam.Columns.Add(this.CotTimeCode_Beatacam_Out);
            //this.gridBandThongTinBetacam.Columns.Add(this.CotTimeCode_Beatacam_Dur);
            //this.gridBandThongTinBetacam.Columns.Add(this.CotTimeCode_File_In);
            //this.gridBandThongTinBetacam.Columns.Add(this.CotTimeCode_File_Out);
            //this.gridBandThongTinBetacam.Columns.Add(this.CotTimeCode_File_Duration);
            this.gridBandThongTinBetacam.Name = "gridBandThongTinBetacam";
            this.gridBandThongTinBetacam.Width = 95;
            //
            // gridBandThongTinHD
            //
            this.gridBandThongTinHD.AppearanceHeader.Options.UseTextOptions = true;
            this.gridBandThongTinHD.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            this.gridBandThongTinHD.Caption = "Thông tin HD (File)";
            this.gridBandThongTinHD.Columns.Add(this.CotSDKCBHD);
            this.gridBandThongTinHD.Columns.Add(this.CotNoiLuuTru);
            this.gridBandThongTinHD.Name = "gridBandThongTinHD";
            this.gridBandThongTinHD.Width = 63;
            #endregion
        }