public override void CopyCheck(object entity) { if (entity != null) { EntityCopying _entity = (EntityCopying)entity; if (_entity._message != "" || _entity._is_lock_success == false) { return; } else { this.DialogResult = true; this.ExistsData = _entity._is_exists_data; Dlg_Copying win = (Dlg_Copying)ExVisualTreeHelper.FindPerentChildWindow(this); win.Close(); return; } } // 失敗 else { ExMessageBox.Show("複写情報の取得で予期せぬエラーが発生しました。"); return; } }
// F12ボタン(キャンセル) クリック public override void btnF12_Click(object sender, RoutedEventArgs e) { this.copy_id = ""; this.DialogResult = false; Dlg_Copying win = (Dlg_Copying)ExVisualTreeHelper.FindPerentChildWindow(this); win.Close(); }
private void copyDlg_Closed(object sender, EventArgs e) { Dlg_Copying dlg = (Dlg_Copying)sender; if (dlg.utlCopying.DialogResult == true) { // ロック解除 DataPgLock.gLockPg(PG_NM, _entity._id, (int)DataPgLock.geLockType.UnLock); if (dlg.utlCopying.copy_id == "") { this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Init; this.btnSalesBalance.IsEnabled = false; this.utlID.txtID_IsReadOnly = false; this.utlID.txtID.Text = ""; } else { if (dlg.utlCopying.ExistsData == true) { this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.Upd; this.btnSalesBalance.IsEnabled = true; } else { this.utlFunctionKey.gFunctionKeyEnable = Utl_FunctionKey.geFunctionKeyEnable.New; this.btnSalesBalance.IsEnabled = false; } string _id = dlg.utlCopying.copy_id; if (ExCast.IsNumeric(dlg.utlCopying.copy_id)) { _id = ExCast.zCDbl(_id).ToString(); _entity._id = _id; this.utlID.txtID.Text = _id; this.utlID.txtID.FormatToID(); } else { _entity._id = _id; this.utlID.txtID.Text = _id; } this.utlID.txtID_IsReadOnly = true; ExBackgroundWorker.DoWork_Focus(this.txtName, 10); } } }
// F1ボタン(OK) クリック public override void btnF1_Click(object sender, RoutedEventArgs e) { if (this.btnF1.IsEnabled == false) { return; } if (this.rdoAri.IsChecked == true && this_txtID.Text.Trim() == "") { ExMessageBox.Show("IDが指定されていません。"); return; } if (ExCast.IsNumeric(this_txtID.Text.Trim())) { if (ExCast.zCDbl(this.before_id) == ExCast.zCDbl(this_txtID.Text.Trim())) { ExMessageBox.Show("複写元と複写先IDが同じです。"); return; } } else { if (this.before_id == this_txtID.Text.Trim()) { ExMessageBox.Show("複写元と複写先IDが同じです。"); return; } } if (this.rdoAri.IsChecked == true) { this.copy_id = this_txtID.Text.Trim(); if (ExCast.IsNumeric(this.copy_id)) { this.copy_id = ExCast.zCDbl(this.copy_id).ToString(); } OnCopyCheck(); } else { this.copy_id = ""; this.DialogResult = true; Dlg_Copying win = (Dlg_Copying)ExVisualTreeHelper.FindPerentChildWindow(this); win.Close(); } }
// F3ボタン(複写) クリック public override void btnF3_Click(object sender, RoutedEventArgs e) { if (_entity == null) { return; } searchDlg = new Dlg_Copying(); searchDlg.utlCopying.gPageType = Common.gePageType.None; searchDlg.utlCopying.gWinMsterType = _WinMsterType; searchDlg.utlCopying.utlMstID.MstKbn = this.MstKbn; searchDlg.utlCopying.tableName = this.tableName; searchDlg.Show(); searchDlg.Closed += searchDlg_Closed; }