private void pnlDBConnection_Click(object sender, EventArgs e) { frmDBConnection f = new frmDBConnection(); f.f1 = this; f.ShowDialog(); }
private void Form1_Shown(object sender, EventArgs e) { if (!Connection.HasConnection()) { frmDBConnection f = new frmDBConnection(); f.f1 = this; f.ShowDialog(); } if (!Connection.HasConnection()) { Application.Exit(); return; } lblConnection.Text = "Connected to: " + Connection.GetConnection().Database; inventory = new Inventory(); datalog = new DataLog(); IL = new List <InventoryRecord>(); ILOUT = new List <InventoryRecord>(); }