Exemple #1
0
        public IkkatsuSyoriMasterFormController()
        {
            form           = new KaikeiSystemBody.views.IkkatsuSyoriMasterForm();
            gridController = new grid.DBPanelGridController <views.grid.IkkatsuSyoriMasterRow>(form.Grid, true);
            gridController.ValidateColumnValue += Grid_ValidateColumnValue;

            form.MenuButtonClicked          += () => MainController.PopActivity();
            form.KaikeiDenpyouButtonClicked += delegate() {
                MainController.SwitchActivity(
                    controllers.MainController.ActivityType.KaikeiDenpyou,
                    controllers.MainController.ActivitySwitchMethod.Change,
                    Context,
                    null);
            };
            form.KamokuButtonClicked  += () => kamokuPopupControlelr.ShowPopup(form);
            form.TekiyouButtonClicked += () => tekiyouPopupController.ShowPopup(form);
            form.NewButtonClicked     += () => form.Grid.SelectBottomRow();

            kamokuPopupControlelr                      = new popup.KamokuPopupController();
            kamokuPopupControlelr.RowClicked          += this.KamokuPopupGridRowClicked;
            hojoKamokuPopupController                  = new popup.HojoKamokuPopupController();
            hojoKamokuPopupController.RowClicked      += this.HojoKamokuPopupGridRowClicked;
            kamokuPopupControlelr.HojoKamokuController = hojoKamokuPopupController;
            tekiyouPopupController                     = new popup.TekiyouPopupController();
            tekiyouPopupController.RowClicked         += TekiyouPopupGridRowClicked;
        }
        public KaikeiDenpyouFormController()
        {
            form_ = new views.KaikeiDenpyouForm();
            form_.ReturnToMenuButtonClicked      += () => MainController.PopActivity();
            form_.ShowAllDataButtonClicked       += () => ChangeQuery(QueryType.All, null);
            form_.ShowCurrentYearButtonClicked   += () => ChangeQuery(QueryType.CurrentYear, null);
            form_.ToggleInvalidDataButtonClicked += delegate() {
                if (queryType == QueryType.InvalidRows)
                {
                    ChangeQuery(QueryType.CurrentYear, null);
                }
                else
                {
                    ChangeQuery(QueryType.InvalidRows, null);
                }
            };
            form_.NewRowButtonClicked               += () => form_.Grid.SelectBottomRow();
            form_.CopyCommentCalled                 += Row_CopyComment;
            form_.CopyKarikataCalled                += Row_CopyKarikata;
            form_.CopyKashikataCalled               += Row_CopyKashikata;
            form_.CopyRowCalled                     += Row_CopyRow;
            form_.SetStatusMessage                  += SetStatusMessage;
            form_.ShowKamokuPopupButtonClicked      += ShowKamokuPopup;
            form_.ShowTekiyouPopupButtonClicked     += ShowTekiyouPopup;
            form_.ShowSubfunctionPopupButtonClicked += ShowSubfunctionPopup;

            queryType = QueryType.None;
            sql_      = "";

            gridController = new grid.DBPanelGridController <views.grid.KaikeiDenpyouRow>(form_.Grid, true);

            gridController.InitInsertedRow        += Grid_InitInsertedRow;
            gridController.ValidateColumnValue    += Grid_ValidateColumnValue;
            gridController.Column_LostFocusAction += Column_LostFocus;
            gridController.ValidateRowValue       += Grid_ValidateRowValue;
            gridController.SetStatusMessage       += SetStatusMessage;
            gridController.RowClicked             += RowClicked;
            gridController.RowUpdated             += Grid_RowUpdated;
            gridController.RowDeleted             += Grid_RowDeleted;

            kamokuPopupControlelr                                       = new popup.KamokuPopupController();
            kamokuPopupControlelr.RowClicked                           += this.KamokuPopupGridRowClicked;
            hojoKamokuPopupController                                   = new popup.HojoKamokuPopupController();
            hojoKamokuPopupController.RowClicked                       += this.HojoKamokuPopupGridRowClicked;
            kamokuPopupControlelr.HojoKamokuController                  = hojoKamokuPopupController;
            tekiyouPopupController                                      = new popup.TekiyouPopupController();
            tekiyouPopupController.RowClicked                          += TekiyouPopupGridRowClicked;
            subfunctionPopupController                                  = new popup.SubfunctionPopupController();
            denpyouBangouSeiriPopupController                           = new popup.DenpyouBangouSeiriPopupController();
            denpyouBangouSeiriPopupController.DenpyouBangouUpdated     += () => this.gridController.Refresh();
            denpyouBangouSeiriPopupController.ReturnToSubfunctionPopup += () => this.ShowSubfunctionPopup();
            ikkatsuSyoriPopupController                                 = new popup.IkkatsuSyoriPopupController();
            ikkatsuSyoriPopupController.DenpyouInerted                 += () => this.ChangeQuery(queryType, "1=1");

            kessanSyuuryouChkIsVisible = true;
            ChangeKessanSyuuryouChkVisibility();
        }
Exemple #3
0
        public YosanFormController()
        {
            form = new KaikeiSystemBody.views.YosanForm();
            form.SearchButtonClicked          += SearchButtonClicked;
            form.DataCheckButtonClicked       += DataCheckButtonClicked;
            form.YosanListButtonClicked       += YosanListButtonClicked;
            form.NewButtonClicked             += NewButtonClicked;
            form.HikitsugiButtonClicked       += HikitsugiButtonClicked;
            form.DeleteButtonClicked          += DeleteButtonClicked;
            form.RedrawButtonClicked          += SearchButtonClicked;
            form.CloseButtonClicked           += () => MainController.PopActivity();
            form.ShowKamokuPopupButtonClicked += delegate() {
                kamokuListPopupController.ShowPopup(form);
            };
            form.CompareButtonClicked += delegate() {
                this.MainController.SwitchActivity(
                    controllers.MainController.ActivityType.YosanJisseki,
                    controllers.MainController.ActivitySwitchMethod.Change,
                    this.Context,
                    null
                    );
            };

            form.PrintButtonClicked += delegate() {
                this.MainController.SwitchActivity(
                    controllers.MainController.ActivityType.PrintYosan,
                    controllers.MainController.ActivitySwitchMethod.PushModal,
                    this.Context,
                    null
                    );
            };

            daikubunPopupController      = new popup.YosanKamokuKubunPopupController <views.grid.YosanKamokuDaikubunRow>();
            chukubunPopupController      = new popup.YosanKamokuKubunPopupController <views.grid.YosanKamokuKubunRow>();
            syoukubunPopupController     = new popup.YosanKamokuKubunPopupController <views.grid.YosanKamokuKubunRow>();
            hojoPopupController          = new popup.YosanKamokuKubunPopupController <views.grid.YosanKamokuKubunRow>();
            yobihiPopupController        = new popup.YosanYobihiPopupController();
            yobihiKakuninPopupController = new popup.YosanYobihiKakuninPopupController();
            yosanKakuninPopupController  = new popup.YosanKakuninPopupController();
            yosanListPopupController     = new popup.YosanListPopupController();

            kamokuListPopupController     = new popup.KamokuPopupController();
            hojoKamokuListPopupController = new popup.HojoKamokuPopupController();
            kamokuListPopupController.HojoKamokuController = hojoKamokuListPopupController;

            focusController = new misc.FocusController(form);

            daikubunPopupController.RowSelectionChanged  += DaikubunRowSelectionChanged;
            chukubunPopupController.RowSelectionChanged  += ChukubunRowSelectionChanged;
            syoukubunPopupController.RowSelectionChanged += SyoukubunRowSelectionChanged;
            hojoPopupController.RowSelectionChanged      += HojokamokuRowSelectionChanged;
            chukubunPopupController.SumAmountIsChanged   += ChukubunSumAmountChanged;
            syoukubunPopupController.SumAmountIsChanged  += SyoukubunSumAmountChanged;
            hojoPopupController.SumAmountIsChanged       += HojoSumAmountChanged;

            yobihiPopupController.CheckDataButtonClicked += delegate(object sender, EventArgs e){
                yobihiKakuninPopupController.ShowPopup(form);
                yobihiKakuninPopupController.SetQueryCondition(form.Year, form.KaikeiKubun, form.YosanKubun, form.HoseiKaisuu);
            };

            yosanListPopupController.ShowButtonClicked += delegate(int nenndo, int kaikeiKubun, int yosanKubun, int hoseiKaisuu) {
                form.Year        = nenndo;
                form.KaikeiKubun = kaikeiKubun;
                form.YosanKubun  = yosanKubun;
                form.HoseiKaisuu = hoseiKaisuu;
                SearchButtonClicked();
            };
        }