예제 #1
0
        public void onInitialUI()
        {
            if (adapter != null)
            {
                adapter.NotifyClearTable();
                adapter.NotifyDestoryTable();
            }

            adapter.Initial(controller.TravleAllEntities(), builder);
            adapter.NotifyfreshDataTable();

            gridHelper.GridControl.DataSource = adapter.ResultTable;
            gridHelper.SetAllColumnEditable(false);
            gridHelper.setColunmsVisual(false, builder.ID, builder.Actuality, builder.WeedDate, builder.Op_Detail, builder.CatalogID, builder.DifferentReason);
            gridHelper.SetCellResposity(builder.Op_Edit, Repo_HLE_Edit);
            gridHelper.SetCellResposity(builder.Op_Delete, Repo_HLE_Delete);


            this.dateE_Sign.DateTime = DateTime.Now.Date;
            this.cmb_Catalog.Properties.Items.Clear();
            foreach (var item in new BudgetCatalogManageController().TravleAllEntities())
            {
                this.cmb_Catalog.Properties.Items.Add(item);
            }

            tv_Statistic.Text = new BudgetStatistician().Statistic(GParam.Create()).toDisplayString();
        }
예제 #2
0
        public void onInitialUI()
        {
            if (adapter != null)
            {
                adapter.NotifyClearTable();
                adapter.NotifyDestoryTable();
            }

            adapter.Initial(controller.TravleAllEntities(), builder);
            adapter.NotifyfreshDataTable();

            gridHelper.GridControl.DataSource = adapter.ResultTable;
            gridHelper.SetAllColumnEditable(false);
            gridHelper.SetAllColumnVisible(false);
            gridHelper.setColunmsVisual(true, builder.Op_Delete, builder.Op_Edit, builder.State, builder.Actuality, builder.WeedDate, builder.Estimate, builder.SignDate, builder.Name);
            gridHelper.SetCellResposity(builder.Op_Edit, Repo_HLE_Edit);
            gridHelper.SetCellResposity(builder.Op_Delete, Repo_HLE_Delete);


            this.dateE_Weed.DateTime = DateTime.Now.Date;

            tv_Catalog.Text        = "";
            tv_Description.Text    = "";
            tv_Estimate.Text       = "";
            tv_Name.Text           = "";
            tv_SignDate.Text       = "";
            simpleButton1.Enabled  = false;
            btn_RevokeWeed.Enabled = false;
        }
예제 #3
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;
        }
예제 #4
0
        public void onInitialUI()
        {
            if (adapter != null)
            {
                adapter.NotifyClearTable();
                adapter.NotifyDestoryTable();
            }

            adapter.Initial(controller.TravleAllEntities(), builder);
            adapter.NotifyfreshDataTable();

            gridHelper.GridControl.DataSource = adapter.ResultTable;
            gridHelper.SetAllColumnEditable(false);
            gridHelper.setColunmsVisual(false, builder.ID);
            gridHelper.SetCellResposity(builder.Op_Edit, Repo_HLE_Edit);
            gridHelper.SetCellResposity(builder.Op_Delete, Repo_HLE_Delete);

            btnE_Name.Text      = "";
            tv_Description.Text = "";
        }
예제 #5
0
        private void btn_sure_Click(object sender, EventArgs e)
        {
            DateTime            startDate      = dateEdit_Start.DateTime.Date;
            DateTime            endDate        = dateEdit_End.DateTime.Date;
            TB_DailyPlanCatalog currentCatalog = cmb_PlanItem.SelectedItem as TB_DailyPlanCatalog;

            //完成日期比例
            dataBuilder_Precent.ClearDataSeries();
            dataBuilder_Precent.AddDataFromTable(statistician.StatisticDailySignPrecent(startDate, endDate, currentCatalog), 0, 1);
            chartHelper_Precent.ReplaceSeries(dataBuilder_Precent.DataSeries);
            //完成状态柱状图
            dataBuilder_State.ClearDataSeries();
            dataBuilder_State.AddDataFromDictonary(statistician.StatisticDailySignState(startDate, endDate, currentCatalog));
            chartHelper_State.ReplaceSeries(dataBuilder_State.DataSeries);
            //完成日历
            schedulerStorage1.Appointments.Clear();
            foreach (var item in controller.QueryEntryByDateAndCatalog(startDate, endDate, currentCatalog.ID))
            {
                Appointment appoint = schedulerStorage1.Appointments.CreateAppointment(DevExpress.XtraScheduler.AppointmentType.Normal);
                appoint.AllDay  = true;
                appoint.Subject = item.Completion;
                appoint.Start   = DateTime.Parse(item.Date);
                appoint.End     = appoint.End;
                schedulerStorage1.Appointments.Add(appoint);
            }
            schedulerControl1.Start = dateEdit_Start.DateTime;
            if (adapter != null)
            {
                adapter.NotifyClearTable();
                adapter.NotifyDestoryTable();
            }
            //完成列表
            adapter.Initial(controller.QueryEntryByDateAndCatalog(startDate, endDate, currentCatalog.ID), builder);
            adapter.NotifyfreshDataTable();
            gridHelper_Record.GridControl.DataSource = adapter.ResultTable;
            gridHelper_Record.SetAllColumnEditable(false);
            gridHelper_Record.SetAllColumnVisible(false);
            gridHelper_Record.setColunmsVisual(true, builder.Completion, builder.Other, builder.Date);
        }
예제 #6
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);
        }
예제 #7
0
        public void onInitialUI()
        {
            if (BookAdapter != null)
            {
                BookAdapter.NotifyClearTable();
                BookAdapter.NotifyDestoryTable();
            }

            BookAdapter.Initial(this.BookController.TravleAllEntities(), BookBuilder);
            BookAdapter.NotifyfreshDataTable();

            this.BookGridHelper.GridControl.DataSource = BookAdapter.ResultTable;
            this.BookGridHelper.Order(BookBuilder.StartDate, new SortByDateCommand(true));

            BookGridHelper.SetAllColumnVisible(false);
            BookGridHelper.SetAllColumnEditable(false);
            BookGridHelper.setColunmsVisual(true, BookBuilder.BookName, BookBuilder.State);
            BookGridHelper.SetColMaxWidth(BookBuilder.State, 60);

            dateE_Sign.DateTime = DateTime.Now.Date;
            btn_update.Enabled  = false;
        }
예제 #8
0
        public void onInitialUI()
        {
            tv_Type.Text         = CurrentSpecialDailyType;
            dateE_Start.DateTime = DateTime.Now.Date;
            dateE_End.Text       = "";
            tv_Other.Text        = "";
            tv_Place.Text        = "";

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

            adpater.Initial(controller.QueryEntriesByType(CurrentSpecialDailyType), builder);
            adpater.NotifyfreshDataTable();

            gridHelper.GridControl.DataSource = adpater.ResultTable;
            gridHelper.setColunmsVisual(false, builder.ID, builder.Type, builder.Color);
            gridHelper.SetAllColumnEditable(false);
            gridHelper.SetCellResposity(builder.Op_Delete, Repo_HLE_Delete);
            gridHelper.SetCellResposity(builder.Op_Edit, Repo_HLE_Edit);
            gridHelper.DisplayRowIndex();
        }