Ejemplo n.º 1
0
        private void frmmain_Load(object sender, EventArgs e)
        {
            Opacity = 0;
            timer1.Enabled = true;
            common.main = this;
            var sidebar = new frmsidebar();
            var login = new frmlogin();
            var viewres = new frmdgview();

            common.mnubar = mnubar;
            common.login = login;
            common.sidebar = sidebar;
            common.viewres = viewres;

            common.login.MdiParent = this;

            Location = new Point(0, 0);
            Size = Screen.PrimaryScreen.WorkingArea.Size;


            sidebar.MdiParent = this;

            viewres.MdiParent = this;
            //f1.MdiParent = this;


            sidebar.Dock = DockStyle.Left; //Sidebar
            viewres.Dock = DockStyle.Right;

            common.login.Show();
        }
Ejemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     string[] course = c_no.SelectedItem.ToString().Split(' ');
     var viewres = new frmdgview(tid, course[0], year.Text, semes.Text, field.Text, sec.Text, seattype.Text,
                                seatst.Text, seatend.Text, maxth.Text, maxlab.Text);
     viewres.MdiParent = MdiParent;
     viewres.Dock = DockStyle.Right;
     //viewres.Width = (MdiParent.Width - 315);
     //viewres.Height = (MdiParent.Height - 15);
     viewres.Show();
     Close();
 }
Ejemplo n.º 3
0
        private void button4_Click(object sender, EventArgs e)
        {
            string column = "";

            if (fsearchas.Text == "Teacher ID")
                column = "tid";
            if (fsearchas.Text == "Teacher Name")
                column = "t_name";
            if (fsearchas.Text == "Faculty of")
                column = "f_of";
            if (fsearchas.Text == "Qualification")
                column = "qualification";
            if (fsearchas.Text == "Email")
                column = "email";
            var resview = new frmdgview(database.dt_query("SELECT * FROM faculty WHERE " + column + " LIKE '%" + searchstrf.Text + "%'"), "faculty");
            resview.MdiParent = MdiParent;


            resview.Show();
        }
Ejemplo n.º 4
0
        private void reslist_SelectedIndexChanged(object sender, EventArgs e)
        {
            int item = reslist.SelectedIndex;
            for (int i = Application.OpenForms.Count - 1; i >= 0; i--)
            {
                if (Application.OpenForms[i].Name == "frmviewres")
                    Application.OpenForms[i].Close();
            }
            if (item < 0)
                item = 0;
            string[] course = reslist.Items[item].ToString().Split(' ');
            var viewres = new frmdgview(course[0], course[2], course[4]);
            viewres.MdiParent = MdiParent;

            if (Application.OpenForms.Count == 2)
                viewres.Dock = DockStyle.Right;

            viewres.Width = (MdiParent.Width - 315);
            viewres.Height = (MdiParent.Height - 15);
            viewres.Show();
        }
Ejemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            string column = "";

            if (searchas.Text == "Student Name")
                column = "s_name";
            if (searchas.Text == "Father Name")
                column = "f_name";
            if (searchas.Text == "Year of Enrolment")
                column = "yoe";
            if (searchas.Text == "Field")
                column = "field";
            if (searchas.Text == "Semester")
                column = "semester";
            if (searchas.Text == "Section")
                column = "sec";

            var resview = new frmdgview(database.dt_query("SELECT * FROM student WHERE " + column + " LIKE '%" + searchstr.Text + "%'"));
            resview.MdiParent = MdiParent;


            resview.Show();
        }