Пример #1
0
        public TyuukiFormController()
        {
            tyuukiRow = null;
            tyuukiId  = -1;

            form = new KaikeiSystemBody.views.TyuukiForm();
            form.CloseButtonClicked += () => MainController.PopActivity();

            form.TyuukiTextChanged += delegate(string columnName, string value) {
                if (tyuukiRow != null)
                {
                    tyuukiRow.Table.SetColumnValue(tyuukiRow, columnName, value);
                    tyuukiRow.Table.Update(tyuukiRow);
                }
            };

            form.ExecButtonClicked += delegate() {
                if (form.InputDate != null)
                {
                    if (SearchData(form.InputDate.Value.Year, form.KaikeiKubun) == SetNenndoResult.Inserted)
                    {
                        helper.MsgBox.Info(KaikeiSystemBody.Properties.Resources.MsgInsertSuccess);
                    }
                    else
                    {
                        helper.MsgBox.Info(KaikeiSystemBody.Properties.Resources.MsgSearchSuccess);
                    }
                }
                else
                {
                    helper.MsgBox.Err(KaikeiSystemBody.Properties.Resources.MsgInvalidDate);
                }
            };

            tyuuki8GridController = new grid.DBPanelGridController <views.grid.Tyuuki8Row>(form.Tyuuki8Grid, true);
            tyuuki8GridController.IsValidNewRow += delegate(models.db.Row row) {
                return(row.GetLong("tyuuki_id", -1) != -1);
            };
            tyuuki8GridController.InitInsertedRow += delegate(models.db.Row row) {
                row.Table.SetColumnValue(row, "tyuuki_id", tyuukiId);
            };

            tyuuki10GridController = new grid.DBPanelGridController <views.grid.Tyuuki10Row>(form.Tyuuki10Grid, true);
            tyuuki10GridController.IsValidNewRow += delegate(models.db.Row row) {
                return(row.GetLong("tyuuki_id", -1) != -1);
            };
            tyuuki10GridController.InitInsertedRow += delegate(models.db.Row row) {
                row.Table.SetColumnValue(row, "tyuuki_id", tyuukiId);
            };

            tyuuki11GridController = new grid.DBPanelGridController <views.grid.Tyuuki11Row>(form.Tyuuki11Grid, true);
            tyuuki11GridController.IsValidNewRow += delegate(models.db.Row row) {
                return(row.GetLong("tyuuki_id", -1) != -1);
            };
            tyuuki11GridController.InitInsertedRow += delegate(models.db.Row row) {
                row.Table.SetColumnValue(row, "tyuuki_id", tyuukiId);
            };

            focusController = new misc.FocusController(form);
        }
Пример #2
0
        public PrintYosanFormController()
        {
            form = new KaikeiSystemBody.views.PrintYosanForm();

            form.CloseButtonClicked += delegate() {
                this.MainController.PopActivity();
            };

            form.CurrentYearChanged += delegate() {
                form.ClearHoseiKaisuuMsg();

                if (form.CurrentYear != -1)
                {
                    int current = Context.KaikeiDatabase.YosanKamokuKubun.GetMax("hosei_kaisuu", "where nenndo = " + form.CurrentYear);
                    form.SetCurrentYearHoseiKaisuuMsg(form.CurrentYear, current);
                }
                if (form.LastYear != -1)
                {
                    int last = Context.KaikeiDatabase.YosanKamokuKubun.GetMax("hosei_kaisuu", "where nenndo = " + form.LastYear);
                    form.SetLastYearHoseiKaisuuMsg(form.LastYear, last);
                }
            };

            form.PrintButtonClicked += PrintButtonClicked;

            focusController = new misc.FocusController(form);
        }
        public PrintMainFormController()
        {
            form = new KaikeiSystemBody.views.PrintMainForm();

            form.CloseButtonClicked += delegate() {
                this.MainController.PopActivity();
            };

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

            form.PrintMototyouButtonClicked += delegate() {
                var popupController = new popup.KanjouMototyouPrintPopupController();
                popupController.ShowPopupModal(form, Context);
            };

            form.PrintButtonClicked += PrintButtonClicked;

            focusController = new misc.FocusController(form);
        }
Пример #4
0
        public BalanceSheetFormController()
        {
            form = new KaikeiSystemBody.views.BalanceSheetForm();
            form.CalcButtonClicked   += CalcButtonClicked;
            form.ReturnButtonClicked += () => MainController.PopActivity();

            focusController = new misc.FocusController(form);
        }
        public KurikoshiSyoriFormController()
        {
            form = new KaikeiSystemBody.views.KurikoshiSyoriForm();

            form.CloseButtonClicked += delegate() {
                this.MainController.PopActivity();
            };

            form.RecalcButtonClicked += delegate() {
            };

            form.ExecuteButtonClicked += Execute;

            focusController = new misc.FocusController(form);
        }
Пример #6
0
        public ShikinSyuushiFormController()
        {
            form = new KaikeiSystemBody.views.ShikinSyuushiForm();
            form.CalcButtonClicked              += CalcButtonClicked;
            form.ReturnButtonClicked            += () => MainController.PopActivity();
            form.ShowJigyouSyuushiButtonClicked += delegate(){
                MainController.SwitchActivity(
                    controllers.MainController.ActivityType.JigyouSyuushi,
                    controllers.MainController.ActivitySwitchMethod.Change,
                    Context
                    );
            };

            form.DaikubunGridRowSelected += DaikubunGridRowSelected;

            focusController = new misc.FocusController(form);
        }
Пример #7
0
        public RootMenuFormController()
        {
            form = new KaikeiSystemBody.views.RootMenuForm();

            form.CloseButtonClicked += delegate() {
                this.MainController.PopActivity();
            };

            form.MargeDatabaseKanjouKamokuTableButtonClicked += delegate() {
                MargeDB(MargeType.KanjouKamoku);
            };
            form.MargeDatabaseDenpyouButtonClicked += delegate() {
                MargeDB(MargeType.Denpyou);
            };

            focusController = new misc.FocusController(form);
        }
Пример #8
0
        public KoteiShisanFormController()
        {
            form            = new KaikeiSystemBody.views.KoteiShisanForm();
            focusController = new misc.FocusController(form);
            gridController  = new grid.DBPanelGridController <views.grid.KoteiShisanRow>(form.Grid, false);
            popupController = new popup.KoteiShisanDetailPopupController();

            form.ShowAllButtonClicked += ShowAllRows;
            form.SelectButtonClicked  += () => ShowSelectedKaikeiKubunRows(form.KaikeiKubun);
            form.DetailButtonClicked  += DetailButtonClicked;
            form.NewButtonClicked     += () => ShowDetailPopup(-1);
            form.MenuButtonClicked    += () => MainController.PopActivity();

            foreach (var row in form.Grid.AllRowControls())
            {
                (row as views.grid.KoteiShisanRow).DetailButtonClicked += DetailButtonClicked;
            }
        }
        public YosanJissekiFormController()
        {
            form            = new KaikeiSystemBody.views.YosanJissekiForm();
            focusController = new misc.FocusController(form);

            form.CalcButtonClicked           += CalcButtonClicked;
            form.PrintButtonClicked          += PrintButtonClicked;
            form.CloseButtonClicked          += () => MainController.PopActivity();
            form.KaikeiKubunSelectionChanged += delegate() { };
            form.KamokuRowSelectionChanged   += KamokuGridRowSelectionChanged;

            form.YosanButtonClicked += delegate() {
                this.MainController.SwitchActivity(
                    controllers.MainController.ActivityType.Yosan,
                    controllers.MainController.ActivitySwitchMethod.Change,
                    this.Context,
                    null
                    );
            };
        }
Пример #10
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();
            };
        }
Пример #11
0
        public BalanceSheetCommentFormController()
        {
            tyuukiRow = null;

            form = new KaikeiSystemBody.views.BalanceSheetCommentForm();
            form.CloseButtonClicked += () => MainController.PopActivity();

            form.JuuyouKaikeiHoushinHenkouChanged += delegate() {
                if (tyuukiRow != null)
                {
                    tyuukiRow.Table.SetColumnValue(tyuukiRow, "juuyou_henkou", form.JuuyouKaikeiHoushinHenkou);
                    tyuukiRow.Table.Update(tyuukiRow);
                }
            };

            form.JuuyouKouhatsuJisyouChanged += delegate() {
                if (tyuukiRow != null)
                {
                    tyuukiRow.Table.SetColumnValue(tyuukiRow, "juuyou_kouhatsu", form.JuuyouKouhatsuJisyou);
                    tyuukiRow.Table.Update(tyuukiRow);
                }
            };

            form.ExecButtonClicked += delegate() {
                if (form.InputDate != null)
                {
                    if (SetNenndo(form.InputDate.Value.Year) == SetNenndoResult.Inserted)
                    {
                        helper.MsgBox.Info(KaikeiSystemBody.Properties.Resources.MsgInsertSuccess);
                    }
                    else
                    {
                        helper.MsgBox.Info(KaikeiSystemBody.Properties.Resources.MsgSearchSuccess);
                    }
                }
                else
                {
                    helper.MsgBox.Err(KaikeiSystemBody.Properties.Resources.MsgInvalidDate);
                }
            };

            genkaGridController = new grid.DBPanelGridController <views.grid.BSCGenkaRow>(form.GenkaGrid, true);
            genkaGridController.InitInsertedRow += delegate(models.db.Row row) {
                row.Table.SetColumnValue(row, "tyuuki_id", tyuukiId);
            };

            kaikeiHoushinGridController = new grid.DBPanelGridController <views.grid.BSCKaikeiHoushinRow>(form.KaikeiHoushinGrid, true);
            kaikeiHoushinGridController.InitInsertedRow += delegate(models.db.Row row) {
                row.Table.SetColumnValue(row, "tyuuki_id", tyuukiId);
                row.Table.SetColumnValue(row, "seiri_bangou", row.Table.GetMax("seiri_bangou") + 1);
            };

            zaisanGridController = new grid.DBPanelGridController <views.grid.BSCZaisanRow>(form.ZaisanGrid, true);
            zaisanGridController.InitInsertedRow += delegate(models.db.Row row) {
                row.Table.SetColumnValue(row, "tyuuki_id", tyuukiId);
            };

            torikuzushiGridController = new grid.DBPanelGridController <views.grid.BSCTorikuzushiRow>(form.TorikuzushiGrid, true);
            torikuzushiGridController.InitInsertedRow += delegate(models.db.Row row) {
                row.Table.SetColumnValue(row, "tyuuki_id", tyuukiId);
            };

            tanpoGridController = new grid.DBPanelGridController <views.grid.BSCTanpoRow>(form.TanpoGrid, true);
            tanpoGridController.InitInsertedRow += delegate(models.db.Row row) {
                row.Table.SetColumnValue(row, "tyuuki_id", tyuukiId);
            };

            focusController = new misc.FocusController(form);

            tyuukiId = 0;
        }
        public KurikoshiFormController()
        {
            form = new KaikeiSystemBody.views.KurikoshiForm();
            form.SearchButtonClicked += UpdateViews;
            form.AddButtonClicked    += AddButtonClicked;
            form.DeleteButtonClicked += DeleteButtonClicked;
            form.CloseButtonClicked  += () => MainController.PopActivity();

            daikubunGridController  = new grid.DBPanelGridController <views.grid.ZenkiKurikoshiKamokuKubunRow>(form.DaikubunGrid, false);
            chukubunGridController  = new grid.DBPanelGridController <views.grid.ZenkiKurikoshiKamokuKubunRow>(form.ChukubunGrid, false);
            syoukubunGridController = new grid.DBPanelGridController <views.grid.ZenkiKurikoshiKamokuKubunRow>(form.SyoukubunGrid, false);
            hojoGridController      = new grid.DBPanelGridController <views.grid.ZenkiKurikoshiKamokuKubunRow>(form.HojokamokuGrid, false);

            daikubunGridController.RowUpdated  += (row) => DaikubunRowUpdated();
            chukubunGridController.RowUpdated  += (row) => ChukubunRowUpdated();
            syoukubunGridController.RowUpdated += (row) => SyoukubunRowUpdated();
            hojoGridController.RowUpdated      += (row) => HojokamokuRowUpdated();

            daikubunGridController.Row_GotFocusAction += delegate(views.grid.ZenkiKurikoshiKamokuKubunRow row) {
                delayTimerController.SetDelayedProc(delegate() {
                    DaikubunRowSelectionChanged();
                });
            };
            chukubunGridController.Row_GotFocusAction += delegate(views.grid.ZenkiKurikoshiKamokuKubunRow row) {
                delayTimerController.SetDelayedProc(delegate() {
                    ChukubunRowSelectionChanged();
                });
            };
            syoukubunGridController.Row_GotFocusAction += delegate(views.grid.ZenkiKurikoshiKamokuKubunRow row) {
                delayTimerController.SetDelayedProc(delegate() {
                    SyoukubunRowSelectionChanged();
                });
            };
            hojoGridController.Row_GotFocusAction += delegate(views.grid.ZenkiKurikoshiKamokuKubunRow row) {
                delayTimerController.SetDelayedProc(delegate() {
                    HojokamokuRowSelectionChanged();
                });
            };

            form.ZenkimatsuShiharaiShikinZandakaChanged += delegate() {
                delayTimerController.SetDelayedProc(delegate() {
                    var result = MessageBox.Show(
                        KaikeiSystemBody.Properties.Resources.MsgConfirmZenkimatsuShiharaiShikinZandakaChange,
                        form.Text,
                        MessageBoxButtons.OKCancel,
                        MessageBoxIcon.Warning);
                    if (result == DialogResult.OK)
                    {
                        SetZenkimatsuShiharaiShikinZandaka(form.ZenkimatsuShiharaiShikinZandaka);
                        UpdateZenkimatsuShiharaiShikinZandakaTextBox();
                    }
                    else
                    {
                        UpdateZenkimatsuShiharaiShikinZandakaTextBox();
                    }
                });
            };

            form.JikiKurikoshiChanged += delegate() {
                SetJikiKurikoshi(form.JikiKurikoshi);
                UpdateJikiKurikoshiTextBox();
            };

            focusController      = new misc.FocusController(form);
            delayTimerController = new misc.DelayTimerController(form);
        }