public frmDocument()
        {
            InitializeComponent();
            barButtonItemThem.Glyph = FWImageDic.ADD_IMAGE20;
            barButtonItemSua.Glyph = FWImageDic.EDIT_IMAGE20;
            barButtonItemXoa.Glyph = FWImageDic.DELETE_IMAGE20;
            barButtonItemLuu.Glyph = FWImageDic.SAVE_IMAGE20;
            barButtonItemKLuu.Glyph = FWImageDic.UNCOMMIT_IMAGE20;
            #region Khai báo sự kiện trên lưới
            this.grdThongtinTL.btnAdd.Click += new System.EventHandler(btnAdd_Click);
            this.grdThongtinTL.btnAdd.MouseDown += new System.Windows.Forms.MouseEventHandler(btnAdd_MouseDown);
            this.grdThongtinTL.btnDel.MouseDown += new System.Windows.Forms.MouseEventHandler(btnDel_MouseDown);
            this.grdThongtinTL.btnUpdate.MouseDown += new System.Windows.Forms.MouseEventHandler(btnUpdate_MouseDown);
            this.grdThongtinTL.btnSave.Click += new EventHandler(btnSave_Click);
            this.grdThongtinTL.btnNoSave.Click += new EventHandler(btnNoSave_Click);
            this.grdThongtinTL.btnNoSave.EnabledChanged += new EventHandler(btnNoSave_EnabledChanged);
            this.LoaiTaiLieu.TreeList_1.FocusedNodeChanged += new DevExpress.XtraTreeList.FocusedNodeChangedEventHandler(TreeList_1_FocusedNodeChanged);
            grdThongtinTL.Grid.LostFocus += new EventHandler(Grid_LostFocus);
            grdThongtinTL.Grid.DoubleClick += new EventHandler(Grid_DoubleClick);
            grdThongtinTL.Grid.ValidateRow += new ValidateRowEventHandler(Grid_ValidateRow);
            grdThongtinTL.Grid.InvalidRowException += new InvalidRowExceptionEventHandler(Grid_InvalidRowException);
            #endregion
            grdThongtinTL._init(GroupElementType.ONLY_INPUT,
                "DM_TAI_LIEU", "ID", "TEN_TAI_LIEU", new string[] { "TEN_TAI_LIEU" }, new string[] { "Tên tài liệu" },
                DMTaiLieu.CreateDM_TAI_LIEU,null, null, null);
            grdThongtinTL.btnClose.Visible = false;

            cotFile = CotFile.Init(grdThongtinTL.Grid,
                XtraGridSupportExt.CreateGridColumn(grdThongtinTL.Grid, "Tên file", 1, 150), "DM_NOI_DUNG_TAI_LIEU", "DATA_ID", 20);
        }
Example #2
0
        public static CotFile Init(GridView Grid, GridColumn Column,
            String DataTb, String ColumnField, Int64 maxFilesize)
        {
            CotFile cot = new CotFile();
            cot._Init(Grid, Column, DataTb, ColumnField, maxFilesize);
            cot.Up_DownEventArgs += new CotFile.Up_DownEventHandler(cot.GetCurrentDO);

            return cot;
        }