コード例 #1
0
        private void btn_Sure_Click(object sender, EventArgs e)
        {
            Validator validator = onValidateInputValue();

            if (validator.IsValidate == false)
            {
                MessageBoxHelper.ShowInputErrorDialog(validator.ErrorMessage);
                return;
            }

            controller.LoadEntry();
            onExtractInputValue();
            if (controller.InsertEntry())
            {
                string state = rg_state.SelectedIndex == 0 ? EnumBookPlanState.Reading : EnumBookPlanState.Read;
                MessageBoxHelper.ShowCreateStateDialog(new ReadPlanManageController().UpdatePlanState(controller.Entry.ReadPlanID, state, calendar_Date.DateTime.Date));
                onInitialUI();
                //如果已经读完,则需要通知更新阅读清单界面
                if (state.Equals(EnumBookPlanState.Read))
                {
                    GParam.Create().Mediator.NotifyUpdateReadPlan();
                }
            }
            else
            {
                MessageBoxHelper.ShowCreateStateDialog(false);
            }
        }
コード例 #2
0
        private void Repo_HLE_Edit_Click(object sender, EventArgs e)
        {
            SignController.CurrentID = SignGridHelper.getFocuseRowCellValue_Int(SignBuilder.ID);
            SignController.LoadEntry();

            tv_Other.Text       = SignController.Entry.Other;
            dateE_Sign.DateTime = DateTime.Parse(SignController.Entry.Date);

            btn_update.Enabled = true;
        }