private void getLogin() { Cursor cursor = Cursor.Current; Cursor.Current = Cursors.WaitCursor; if (lc.getLoginByCode(txtId.Text, txtPwd.Text)) { Staff sf = lc.sfdb.selectByCode(txtId.Text); if (sf.Priority.Equals("1")) { FrmInputAdd frm = new FrmInputAdd(txtId.Text, lc); //frm.setLC(lc); frm.Show(); this.Hide(); } else if (sf.Priority.Equals("2")) { FrmLottoApprove frm = new FrmLottoApprove(txtId.Text, lc); frm.Show(); this.Hide(); } else if (sf.Priority.Equals("3")) { FrmMain frm = new FrmMain(null, txtId.Text, lc); frm.Show(); this.Hide(); } } else { if (txtId.Text.Equals("pop") && txtPwd.Text.Equals("Ekartc2c5")) { FrmMain frm = new FrmMain(null, txtId.Text, lc); frm.Show(); this.Hide(); } } Cursor.Current = cursor; }