예제 #1
0
        public void onInitialUI()
        {
            onLoadBookCatalog();

            if (adapter != null)
            {
                adapter.NotifyClearTable();
                adapter.NotifyDestoryTable();
            }

            adapter.Initial(controller.TravleAllEntities(), builder);
            adapter.NotifyfreshDataTable();
            gridHelper.GridControl.DataSource = adapter.ResultTable;

            gridHelper.setColunmsVisual(false, builder.ID, builder.Catalog);
            gridHelper.SetAllColumnEditable(false);
            gridHelper.setColunmsEdit(true, builder.Op_Delete, builder.Op_Edit, builder.Op_Giveup);
            gridHelper.SetCellResposity(builder.Op_Edit, Repo_HLE_Edit);
            gridHelper.SetCellResposity(builder.Op_Delete, Repo_HLE_Delete);
            gridHelper.SetCellResposity(builder.Op_Giveup, Repo_HLE_GiveupOrRestart);
            gridHelper.Group(builder.State);
            gridHelper.GridView.ExpandAllGroups();

            tv_Author.Text      = "";
            tv_BookName.Text    = "";
            dateE_Sign.DateTime = DateTime.Now.Date;
        }
예제 #2
0
        private void gridView_ReadPlan_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
        {
            long RealPlanID = this.BookGridHelper.getFocuseRowCellValue_Long(BookBuilder.ID);

            if (SignAdapter != null)
            {
                SignAdapter.NotifyClearTable();
                SignAdapter.NotifyDestoryTable();
            }

            SignAdapter.Initial(this.SignController.QueryEntriesByReadPlanID(RealPlanID), SignBuilder);
            SignAdapter.NotifyfreshDataTable();

            this.SignGridHelper.GridControl.DataSource = SignAdapter.ResultTable;
            this.SignGridHelper.Order(SignBuilder.Date, new SortByDateCommand(true));

            SignGridHelper.SetAllColumnEditable(false);
            SignGridHelper.setColunmsVisual(false, this.SignBuilder.ID, this.SignBuilder.BookName, SignBuilder.ReadPlanID);
            SignGridHelper.setColunmsEdit(true, SignBuilder.Op_Delete, SignBuilder.Op_Edit);
            SignGridHelper.SetCellResposity(SignBuilder.Op_Edit, Repo_HLE_Edit);
            SignGridHelper.SetCellResposity(SignBuilder.Op_Delete, Repo_HLE_Delete);
        }