Exemplo n.º 1
0
        /// <summary>
        /// 登録コマンド
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void RegisterCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            // DB登録
            int?id = await this.RegisterToDbAsync();

            // MainWindow更新
            List <int> value = id != null ? new List <int>()
            {
                id.Value
            } : new List <int>();

            Registrated?.Invoke(this, new EventArgs <List <int> >(value));

            this.DialogResult = true;
            this.Close();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 続けて入力コマンド
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void ContinueToRegisterCommand_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            // DB登録
            int?id = await this.RegisterToDbAsync();

            // MainWindow更新
            List <int> value = id != null ? new List <int>()
            {
                id.Value
            } : new List <int>();

            Registrated?.Invoke(this, new EventArgs <List <int> >(value));

            // 表示クリア
            this.WVM.Value = null;
            this.WVM.Count = 1;
        }