Esempio n. 1
0
        private void btnVoltar_Click(object sender, EventArgs e)
        {
            frmInicio inicio = new frmInicio();

            this.Hide();
            inicio.ShowDialog();
            this.Close();
        }
Esempio n. 2
0
 private void btnVoltar_Click(object sender, EventArgs e)
 {
     if (util.ConfirmaMsg("Deseja realmente sair?"))
     {
         frmInicio inicio = new frmInicio();
         this.Hide();
         inicio.ShowDialog();
         this.Close();
     }
 }
Esempio n. 3
0
        void voltar()
        {
            switch (formOption)
            {
            case 0:    //login
                frmLogin login = new frmLogin();
                this.Hide();
                login.ShowDialog();
                this.Close();
                break;

            case 1:    //admin dashboard
                if (!backToDash)
                {
                    frmConsultaEmprestimo consultaEmprestimo = new frmConsultaEmprestimo(userId, formOption);
                    this.Hide();
                    consultaEmprestimo.ShowDialog();
                    this.Close();
                }
                else
                {
                    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;

            default:
                formOption = 3;
                voltar();
                break;
            }
        }
Esempio n. 4
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;
            }
        }