private void btnLogin_Click(object sender, EventArgs e) { username = txtUsername.Text; password = txtPassword.Text; id = Convert.ToInt32(usersTableAdapter.SelectID(username, password)); if (id != 0) { posForm = new POSForm(username); Hide(); posForm.ShowDialog(); } else { MessageBox.Show("Enter the correct Username and Password!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public Calc(POSForm frm) { InitializeComponent(); frm1 = frm; }