コード例 #1
0
ファイル: Login.cs プロジェクト: mewtcor/AppDevProj
        private void btnLogin_Click(object sender, EventArgs e)
        {
            LoginClass lclass   = new LoginClass();
            string     username = txtUsername.Text;
            string     password = txtPassword.Text;
            string     uaccess  = "";
            string     UsrRole  = lclass.validateLogin(username, password, uaccess);

            if (UsrRole == "Administrator")
            {
                Hide();
                AdminDash adForm = new AdminDash();
                adForm.Show();
                Hide();
            }
            else if (UsrRole == "Assistant")
            {
                Hide();
                //show Assistant Dash
                AssistantDash astForm = new AssistantDash();
                astForm.Show();
            }
            else if (UsrRole == "Doctor")
            {
                Hide();
                //show Doctor Dash
                DoctorDash drForm = new DoctorDash();
                drForm.Show();
            }
        }
コード例 #2
0
        private void adminToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Hide();
            AdminDash adDash = new AdminDash();

            adDash.Show();
        }