Пример #1
0
        private void btnNovoEmprestimo_Click(object sender, EventArgs e)
        {
            frmSelecionaUser selUser = new frmSelecionaUser(idUser, 1);

            this.Hide();
            selUser.ShowDialog();
            this.Close();
        }
Пример #2
0
        void voltar()
        {
            switch (formOption)
            {
            case 0:    //login
                frmLogin login = new frmLogin();
                this.Hide();
                login.ShowDialog();
                this.Close();
                break;

            case 1:    //admin dashboard
                frmDashboardAdm adm = new frmDashboardAdm(userId);
                this.Hide();
                adm.ShowDialog();
                this.Close();
                break;

            case 2:    //user dashboard
                frmDashboard dash = new frmDashboard(userId);
                this.Hide();
                dash.ShowDialog();
                this.Close();
                break;

            case 3:    //inicio
                frmInicio inicio = new frmInicio();
                this.Hide();
                inicio.ShowDialog();
                this.Close();
                break;

            case 4:    //selUser
                frmSelecionaUser selUser = new frmSelecionaUser(userId, formUser);
                this.Hide();
                selUser.ShowDialog();
                this.Close();
                break;

            default:
                formOption = 3;
                voltar();
                break;
            }
        }