private void lnkBack_Click(object sender, EventArgs e)
        {
            frmDashboard _frmDashboard = new frmDashboard();

            _frmDashboard.Show();
            this.Hide();
        }
Exemplo n.º 2
0
        private void tbPassword_ButtonClick(object sender, EventArgs e)
        {
            List <User> user = oB.bGetUser(0, null, tbUserName.Text, tbPassword.Text);

            if (user.Count > 0)
            {
                Global.UserName = string.Format("Welcome, {0} {1}", user[0].FirstName, user[0].LastName);
                Global.Role     = user[0].RoleId;
                Global.UserId   = user[0].Id;
                frmDashboard _frmDashboard = new frmDashboard();
                _frmDashboard.Show();
                this.Hide();
            }
            else
            {
                MetroMessageBox.Show(this, "Wrong Username/Password!?", "Wrong credentials", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }