Exemplo n.º 1
0
        /// <summary>
        /// テンプレートを選択してTODO作成をクリック
        /// </summary>
        private void SelectTemplateClick()
        {
            var window = new TemplateSelectWindow()
            {
                Owner = this._window
            };

            if (true != window.ShowDialog())
            {
                return;
            }
            var repo = new MyLogRepo();

            try {
                this.LogData = repo.CreateLogByTemplateId(window.SelectedTemplateId, this.RecordedOn);
            } catch (Exception ex) {
                Message.ShowError(this._window, Message.ErrId.Err003, ex.Message);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 既存のテンプレートから追加クリック時の処理
        /// </summary>
        private void SelectTemplateClick()
        {
            var window = new TemplateSelectWindow()
            {
                Owner = this._window
            };

            if (true != window.ShowDialog())
            {
                return;
            }
            this.TemplateData = null;
            this.EditMode     = true;
            this._isNew       = true;
            this._window.cTemplateName.Focus();

            var repo = new TemplateRepo();

            this.TemplateData = repo.SelectByTemplateId(window.SelectedTemplateId);
            this.Name         = "";
        }