ボタンをクリックして実行し、データセットに出力する必要がある SQL クエリがあります。
public partial class Form1 : Form
{
private void Form1_Load(object sender, EventArgs e)
{
Assembly.GetExecutingAssembly().GetName().Version.ToString();
var line = txtLine.Text;
var serial = txtSerial.Text;
var station = txtStation.Text;
}
private void btnGo_Click(object sender, EventArgs e)
{
var line = txtLine.Text;
var serial = txtSerial.Text;
var station = txtStation.Text;
if (txtLine.Text.Trim().Length == 0)
{
MessageBox.Show("Please enter a Line");
}
else if (txtSerial.Text.Trim().Length == 0)
{
MessageBox.Show("Please enter a Serial");
}
else if (txtStation.Text.Trim().Length == 0)
{
MessageBox.Show("Please enter a Station");
}
else
{
//SQL command goes here.
}
}
}
非ストア プロシージャとして実行し、データを dataGridView1 オブジェクトに出力する方法を知る必要がある SQL コマンドがあります。