Ejemplo n.º 1
0
        private void FHomeB_Click(object sender, EventArgs e)
        {
            FHomeP.BringToFront();
            FHomeSemistercomboBox.DataSource =
                DataAccess.GetDataTable("select semister from taken_course where fId='" + _fid + "' group by semister");

            FHomeSemistercomboBox.DisplayMember  = "semister";
            FHomeSemisterDataGridView.DataSource = DataAccess.GetDataTable("select course_id as 'Course id',course_name as 'Course name',creadit as 'Creadit'  from taken_course where semister='" + FHomeSemistercomboBox.GetItemText(FHomeSemistercomboBox.SelectedItem) + "' and fId='" + _fid + "'");
        }
Ejemplo n.º 2
0
        private void Faculty_Load(object sender, EventArgs e)
        {
            DataTable dt = DataAccess.GetDataTable("select name,dept from faculty");

            _fname        = dt.Rows[0]["name"].ToString();
            _fdept        = dt.Rows[0]["dept"].ToString();
            FNlabel.Text  = _fname;
            FIdlebel.Text = _fid;

            DataTable dt1 = DataAccess.GetDataTable("select status,semister from fprereg");

            if (dt1.Rows[0]["status"].Equals(1))
            {
                FRegB.Enabled = true;
            }
            _pregsemister = dt1.Rows[0]["semister"].ToString();
            FHomeSemistercomboBox.DataSource =
                DataAccess.GetDataTable("select semister from taken_course where fId='" + _fid + "' group by semister");

            FHomeSemistercomboBox.DisplayMember  = "semister";
            FHomeSemisterDataGridView.DataSource = DataAccess.GetDataTable("select course_id as 'Course id',course_name as 'Course name',creadit as 'Creadit'  from taken_course where semister='" + FHomeSemistercomboBox.GetItemText(FHomeSemistercomboBox.SelectedItem) + "' and fId='" + _fid + "'");
        }
Ejemplo n.º 3
0
 private void FHomeSemistercomboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     FHomeSemisterDataGridView.DataSource = DataAccess.GetDataTable("select course_id as 'Course id',course_name as 'Course name',creadit as 'Creadit'  from taken_course where semister='" + FHomeSemistercomboBox.GetItemText(FHomeSemistercomboBox.SelectedItem) + "' and fId='" + _fid + "'");
 }