private void button1_Click(object sender, EventArgs e) { GyoshaMstSearchForm frm = new GyoshaMstSearchForm(); frm.ShowDialog(); }
//////////////////////////////////////////////////////////////////////////// // イベント名 : syozokuGyoshaToSearchButton_Click /// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> /// <history> /// 日付 担当者 内容 /// 2014/07/25 AnhNV 新規作成 /// </history> //////////////////////////////////////////////////////////////////////////// private void syozokuGyoshaToSearchButton_Click(object sender, EventArgs e) { TraceLog.StartWrite(MethodInfo.GetCurrentMethod()); Cursor preCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; // Open gyoshaMst search form GyoshaMstSearchForm form = new GyoshaMstSearchForm(); form.ShowDialog(); // User close the form if (form.DialogResult != DialogResult.OK) return; // No row is selected if (form._selectedRow == null) return; // 所属業者名(終了)(10) syozokuGyoshaNmToTextBox.Text = (form._selectedRow.Cells["GyoshaNmCol"].Value != null) ? form._selectedRow.Cells["GyoshaNmCol"].Value.ToString() : string.Empty; // 所属業者コード(終了)(hidden) syozokuGyosyaCdToTextBox.Text = (form._selectedRow.Cells["GyoshaCdCol"].Value != null) ? form._selectedRow.Cells["GyoshaCdCol"].Value.ToString() : string.Empty; } catch (Exception ex) { TraceLog.ErrorWrite(MethodInfo.GetCurrentMethod(), ex.ToString()); MessageForm.Show(MessageForm.DispModeType.Error, MessageResouce.MSGID_E00001, ex.Message); } finally { Cursor.Current = preCursor; TraceLog.EndWrite(MethodInfo.GetCurrentMethod()); } }