private void cekrole() { if (TP == "True" && TPK == "False") { MessageBox.Show("Welcome " + textBoxuserid.Text + "", "TP",MessageBoxButtons.OK, MessageBoxIcon.Asterisk,MessageBoxDefaultButton.Button1); textBoxuserid.Text = ""; textBoxPassword.Text = ""; FormTP FTP = new FormTP(); FTP.ShowDialog(); } else if (TP == "False" && TPK == "True") { MessageBox.Show("Welcome " + textBoxuserid.Text + "", "TPK", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1); textBoxuserid.Text = ""; textBoxPassword.Text = ""; FormTPK FTPK = new FormTPK(); FTPK.ShowDialog(); } else if (TP == "True" && TPK == "True") { MessageBox.Show("Welcome " + textBoxuserid.Text + "", "Super User", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1); textBoxuserid.Text = ""; textBoxPassword.Text = ""; FormMenu FMenu = new FormMenu(); FMenu.ShowDialog(); } else { MessageBox.Show("Anda Tidak Mempunyai Hak Akses Ke Menu", "Informasi", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); textBoxuserid.Text = ""; textBoxPassword.Text = ""; } }
private void buttonTPK_Click(object sender, EventArgs e) { FormTPK FTPK = new FormTPK(); FTPK.ShowDialog(); }