private void button1_Click(object sender, EventArgs e) { frmVisitorByPass frm = new frmVisitorByPass(); frm.StartPosition = FormStartPosition.CenterParent; frm.formMode = FormMode.Add; frm.visitorMode = VisitorMode.In; if (frm.ShowDialog() == DialogResult.OK) { ResetScreen(); } }
private void other_card_Click(object sender, EventArgs e) { frmVisitorByPass frm = new frmVisitorByPass(); frm.StartPosition = FormStartPosition.CenterParent; frm.formMode = FormMode.Add; frm.visitorMode = VisitorMode.In; if (frm.ShowDialog() == DialogResult.OK) { this.DialogResult = DialogResult.OK; this.Close(); } }