public static DialogResult Show(string Text, string Caption, string btnDownload, string btnCancel) { MsgBox = new Referrals(); MsgBox.label1.Text = Text; MsgBox.btnCancel.Text = btnCancel; MsgBox.btnDownload.Text = btnDownload; MsgBox.ShowDialog(); return(result); }
private void btnOK_Click(object sender, EventArgs e) { if (cmbCase2.SelectedIndex == 0) { Referrals.Show("Enter Patient No.", "Search Patient Details", "Print", "Back"); MsgBox.Close(); } else if (cmbCase2.SelectedIndex == 1) { Transfers.Show("Enter Patient No.", "Search Patient Details", "Print", "Back"); MsgBox.Close(); } else { MessageBox.Show("Please Select at least one Case to view"); } }