private void ViewStudentProfile_Load(object sender, EventArgs e)
        {
            this.Text = "Welcome " + stName;

            ob = new Gateway();
            ob.FillDeptComboBox();
            for (i = 0; i < ob.countDeptRow; i++)
            {
                stDeptComboBox.Items.Add(ob.deptName[i]);
            }


            connection.Open();
            string        queryString = "SELECT Student_ID,St_Name,(SELECT Dept_Name FROM Dept_Info_Table WHERE Dept_ID=Student_Info_Table.Dept_ID)as Dept,Year,Semester,Mobile,Email,Password FROM Student_Info_Table WHERE Student_ID='" + studentID + "'";
            SqlCommand    command     = new SqlCommand(queryString, connection);
            SqlDataReader reader      = command.ExecuteReader();

            while (reader.Read())
            {
                stIdTextBox.Text        = reader["Student_ID"].ToString();
                stNameTextBox.Text      = reader["St_Name"].ToString();
                stDeptComboBox.Text     = reader["Dept"].ToString();
                stYearComboBox.Text     = reader["Year"].ToString();
                stSemesterComboBox.Text = reader["Semester"].ToString();
                stMobileTextBox.Text    = reader["Mobile"].ToString();
                stEmailTextBox.Text     = reader["Email"].ToString();
                stPassTextBox.Text      = reader["Password"].ToString();
            }
            connection.Close();
        }
Ejemplo n.º 2
0
        private void ViewTeacherProfile_Load(object sender, EventArgs e)
        {
            this.Text = "Welcome " + teacherName;

            ob = new Gateway();
            ob.FillDeptComboBox();
            for (i = 0; i < ob.countDeptRow; i++)
            {
                dNameComboBox.Items.Add(ob.deptName[i]);
            }


            connection.Open();
            string        queryString = "SELECT Teacher_ID,Teacher_Name,Designation,(SELECT Dept_Name FROM Dept_Info_Table WHERE Dept_ID=Teacher_Info_Table.Dept_ID)as Dept,Password FROM Teacher_Info_Table WHERE Teacher_ID='" + teacherID + "'";
            SqlCommand    command     = new SqlCommand(queryString, connection);
            SqlDataReader reader      = command.ExecuteReader();

            while (reader.Read())
            {
                teacherIdTextBox.Text   = reader["Teacher_ID"].ToString();
                teacherNameTextBox.Text = reader["Teacher_Name"].ToString();
                designationTextBox.Text = reader["Designation"].ToString();
                dNameComboBox.Text      = reader["Dept"].ToString();
                passwordTextBox.Text    = reader["Password"].ToString();
            }
            connection.Close();
        }
Ejemplo n.º 3
0
 private void AddStudent_Info_Load(object sender, EventArgs e)
 {
     ob = new Gateway();
     ob.FillDeptComboBox();
     for (i = 0; i < ob.countDeptRow; i++)
     {
         stDeptComboBox.Items.Add(ob.deptName[i]);
     }
 }
Ejemplo n.º 4
0
 private void Add_Teacher_Info_Load(object sender, EventArgs e)
 {
     ob = new Gateway();
     ob.FillDeptComboBox();
     for (i = 0; i < ob.countDeptRow; i++)
     {
         dNameComboBox.Items.Add(ob.deptName[i]);
         searchDeptComboBox.Items.Add(ob.deptName[i]);
     }
 }
Ejemplo n.º 5
0
        private void Add_Dept_Info_Load(object sender, EventArgs e)
        {
            int i;

            gateways = new Gateway();
            gateways.FillDeptComboBox();
            for (i = 0; i < gateways.countDeptRow; i++)
            {
                searchComboBox.Items.Add(gateways.deptName[i]);
            }
        }
Ejemplo n.º 6
0
        private void Add_Routine_Info_Load(object sender, EventArgs e)
        {
            //For Course ComboBox Tooltip------------------------------

            courseComboBox.DrawMode        = DrawMode.OwnerDrawFixed;
            courseComboBox.DrawItem       += courseComboBox_DrawItem;
            courseComboBox.DropDownClosed += courseComboBox_DropDownClosed;

            //Fill Dept Name ComboBox ----------------------------------
            gateways = new Gateway();
            gateways.FillDeptComboBox();
            for (i = 0; i < gateways.countDeptRow; i++)
            {
                deptNameComboBox.Items.Add(gateways.deptName[i]);
                searchDeptComboBox.Items.Add(gateways.deptName[i]);
                deptForTeachercomboBox.Items.Add(gateways.deptName[i]);
            }
        }
Ejemplo n.º 7
0
        private void Teacher_Profile_Load(object sender, EventArgs e)
        {
            //teacherDataGridView.AutoGenerateColumns = false;
            this.Text = teacherName;
            // Tool tip for Course ComboBox
            courseComboBox.DrawMode        = DrawMode.OwnerDrawFixed;
            courseComboBox.DrawItem       += courseComboBox_DrawItem;
            courseComboBox.DropDownClosed += courseComboBox_DropDownClosed;
            // Fill Dept ComboBox

            gateways = new Gateway();
            gateways.FillDeptComboBox();
            for (c = 0; c < gateways.countDeptRow; c++)
            {
                deptComboBox.Items.Add(gateways.deptName[c]);
            }

            //----------------------------
        }