private void btnOpen_Click(object sender, EventArgs e) { int orderId; if(lbCustomers.SelectedItem == null) return; orderId = (lbCustomers.SelectedItem as ListItem).Value; frmMain mainForm = new frmMain(orderId); mainForm.Show(); }
private void btnNew_Click(object sender, EventArgs e) { frmMain mainForm = new frmMain(); mainForm.Show(); }