Esempio n. 1
0
        private void button4_Click(object sender, EventArgs e)
        {
            EnrollmentAdmin frm = new EnrollmentAdmin();

            this.Hide();
            frm.Show();
        }
Esempio n. 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            EnrollmentAdmin EA = new EnrollmentAdmin();

            EA.Show();
            this.Hide();
        }
Esempio n. 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            EnrollmentAdmin fr3 = new EnrollmentAdmin();

            fr3.ShowDialog();
            return;
        }
Esempio n. 4
0
        private void button9_Click(object sender, EventArgs e)
        {
            totalFeeController.addTotalFee(totalFee, int.Parse(dataGridView2.Rows[0].Cells["tf_id"].Value.ToString()));
            MessageBox.Show("Succesfully Saved Total Fee");

            EnrollmentAdmin frm = new EnrollmentAdmin();

            frm.Show();
            this.Hide();
        }
Esempio n. 5
0
        private void button5_Click(object sender, EventArgs e)
        {
            /*   this.Hide();
             * SchoolFees fr3 = new SchoolFees();
             * fr3.ShowDialog();
             * return;*/
            EnrollmentAdmin frm = new EnrollmentAdmin();

            frm.Show();

            this.Hide();
        }
Esempio n. 6
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (isValid())
            {
                string userId = UserLog.getUserId();
                user.ChangedPass(userId, txtPassword.Text.Trim());
                MessageBox.Show("Succesfully Changed Password");

                if (role == "System Admin")
                {
                    Admin admin = new Admin();
                    admin.Show();
                    this.Hide();
                }
                else if (role == "Enrollment Admin")
                {
                    EnrollmentAdmin admin = new EnrollmentAdmin();
                    admin.Show();
                    this.Hide();
                }
                else if (role == "Cashier")
                {
                    CashierDashboard cash = new CashierDashboard();
                    this.Hide();
                    cash.Show();
                }
                else if (role == "Registrar")
                {
                    RegistrarForm registrarForm = new RegistrarForm();
                    this.Hide();
                    registrarForm.Show();
                }
                else
                {
                    TeacherFrm frm = new TeacherFrm();
                    frm.Show();
                    this.Hide();
                }
            }
        }
Esempio n. 7
0
        private void btnLogin_Click(object sender, EventArgs e)

        {
            if (!isConnected)
            {
                label1.Text = "No Connection";
                MessageBox.Show("There is no connection to the database.", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Hide();
                IPConfigFormcs g = new IPConfigFormcs();
                g.ShowDialog();
            }
            else
            {
                string role = control.login(txtUsername.Text.Trim(), txtPassword.Text.Trim());

                if (role == "")
                {
                    MessageBox.Show("incorrect username or password", "Validation", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else
                {
                    audittrail.addAudit(label7.Text.Trim(), "User has been Login");
                    control.setOnline(UserLog.getUserId());
                    int isPaswwordChanged = UserLog.getIsPasswordChanged();
                    //    LoginPreferences.CreateLoginPrefFile();
                    if (role == "System Admin")
                    {
                        if (isPaswwordChanged == 0)
                        {
                            Generated frmGen = new Generated(role);
                            frmGen.Show();
                            this.Hide();
                        }
                        else
                        {
                            Admin frm = new Admin();
                            frm.Show();
                            this.Hide();
                        }
                    }

                    else if (role == "Registrar")
                    {
                        if (isPaswwordChanged == 0)
                        {
                            Generated frmGen = new Generated(role);
                            frmGen.Show();
                            this.Hide();
                        }
                        else
                        {
                            RegistrarForm frm = new RegistrarForm();
                            frm.Show();
                            this.Hide();
                        }
                    }

                    else if (role == "Enrollment Admin")
                    {
                        if (isPaswwordChanged == 0)
                        {
                            Generated frmGen = new Generated(role);
                            frmGen.Show();
                            this.Hide();
                        }
                        else
                        {
                            EnrollmentAdmin frm = new EnrollmentAdmin();
                            frm.Show();
                            this.Hide();
                        }
                    }

                    else if (role == "Cashier")
                    {
                        if (isPaswwordChanged == 0)
                        {
                            Generated frmGen = new Generated(role);
                            frmGen.Show();
                            this.Hide();
                        }
                        else
                        {
                            CashierDashboard frm = new CashierDashboard();
                            frm.Show();
                            this.Hide();
                        }
                    }

                    else if (role == "Teacher")
                    {
                        if (isPaswwordChanged == 0)
                        {
                            Generated frmGen = new Generated(role);
                            frmGen.Show();
                            this.Hide();
                        }
                        else
                        {
                            TeacherFrm frm = new TeacherFrm();
                            frm.Show();
                            this.Hide();
                        }
                    }
                }
            }
        }