Exemplo n.º 1
0
        private void classtimeBtn_Click(object sender, EventArgs e)
        {
            ClassTimings ct = new ClassTimings();

            MainClass.showWindow(ct, this, ActiveForm);
        }
Exemplo n.º 2
0
        private void notificationBtn_Click(object sender, EventArgs e)
        {
            Notifications n = new Notifications();

            MainClass.showWindow(n, this, MDI.ActiveForm);
        }
Exemplo n.º 3
0
        private void attendanceBtn_Click(object sender, EventArgs e)
        {
            Attendance at = new Attendance();

            MainClass.showWindow(at, this, MDI.ActiveForm);
        }
Exemplo n.º 4
0
        private void groupBtn_Click(object sender, EventArgs e)
        {
            Groups g = new Groups();

            MainClass.showWindow(g, this, MDI.ActiveForm);
        }
Exemplo n.º 5
0
        private void timetableBtn_Click(object sender, EventArgs e)
        {
            TimeTable tt = new TimeTable();

            MainClass.showWindow(tt, this, MDI.ActiveForm);
        }
Exemplo n.º 6
0
        private void subjectsBtn_Click(object sender, EventArgs e)
        {
            Subjects sb = new Subjects();

            MainClass.showWindow(sb, this, MDI.ActiveForm);
        }
Exemplo n.º 7
0
        private void feevoucherBtn_Click(object sender, EventArgs e)
        {
            FeeVoucher fv = new FeeVoucher();

            MainClass.showWindow(fv, this, MDI.ActiveForm);
        }
Exemplo n.º 8
0
        private void roleBtn_Click(object sender, EventArgs e)
        {
            Roles rls = new Roles();

            MainClass.showWindow(rls, this, MDI.ActiveForm);
        }
Exemplo n.º 9
0
        private void sectionBtn_Click(object sender, EventArgs e)
        {
            Sections sec = new Sections();

            MainClass.showWindow(sec, this, MDI.ActiveForm);
        }
Exemplo n.º 10
0
        private void classesBtn_Click(object sender, EventArgs e)
        {
            Classes cls = new Classes();

            MainClass.showWindow(cls, this, MDI.ActiveForm);
        }
Exemplo n.º 11
0
        private void staffBtn_Click(object sender, EventArgs e)
        {
            Staff s = new Staff();

            MainClass.showWindow(s, this, MDI.ActiveForm);
        }
Exemplo n.º 12
0
        private void studentBtn_Click(object sender, EventArgs e)
        {
            Students st = new Students();

            MainClass.showWindow(st, this, MDI.ActiveForm);
        }
Exemplo n.º 13
0
        private void loginbtn_Click(object sender, EventArgs e)
        {
            HomeScreen hs = new HomeScreen();

            MainClass.showWindow(hs, this, MDI.ActiveForm);
        }
Exemplo n.º 14
0
        private void savebutton_Click(object sender, EventArgs e)
        {
            StringBuilder sb = new StringBuilder();

            if (CB.Checked)
            {
                if (datasourcetxt.Text == "")
                {
                    dserrorLabel.Visible = true;
                }
                else
                {
                    dserrorLabel.Visible = false;
                }
                if (databasetxt.Text == "")
                {
                    dberrorLabel.Visible = true;
                }
                else
                {
                    dberrorLabel.Visible = false;
                }
                if (dserrorLabel.Visible || dberrorLabel.Visible)
                {
                    MessageBox.Show("Fields with * are mandatory!");
                }
                else
                {
                    sb.Append("Data Source" + datasourcetxt.Text + ";Initial catalog= " + databasetxt + ";Security = true; MultipleActiveResultSets=ture");
                    File.WriteAllText(MainClass.path + "\\connect", sb.ToString());
                    DialogResult dr = MessageBox.Show("Setting Save Successfully,", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (dr == DialogResult.OK)
                    {
                        Login log = new Login();
                        MainClass.showWindow(log, this, MDI.ActiveForm);
                    }
                }
            }
            else
            {
                if (datasourcetxt.Text == "")
                {
                    dserrorLabel.Visible = true;
                }
                else
                {
                    dserrorLabel.Visible = false;
                }
                if (databasetxt.Text == "")
                {
                    dberrorLabel.Visible = true;
                }
                else
                {
                    dberrorLabel.Visible = false;
                }
                if (usernametxt.Text == "")
                {
                    unerrorLabel.Visible = true;
                }
                else
                {
                    unerrorLabel.Visible = false;
                }
                if (passtxt.Text == "")
                {
                    pwerrorLabel.Visible = true;
                }
                else
                {
                    pwerrorLabel.Visible = false;
                }
                if (dserrorLabel.Visible || dberrorLabel.Visible)
                {
                    MessageBox.Show("Fields with * are mandatory!");
                }
                else
                {
                    sb.Append("Data Source" + datasourcetxt.Text + ";Initial catalog= " + databasetxt + ";User ID =" + usernametxt.Text + "Password="******"MultipleActiveResultSets=ture");
                    File.WriteAllText(MainClass.path + "\\connect", sb.ToString());
                    DialogResult dr = MessageBox.Show("Setting Save Successfully,", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    if (dr == DialogResult.OK)
                    {
                        Login log = new Login();
                        MainClass.showWindow(log, this, MDI.ActiveForm);
                    }
                }
            }
        }