Example #1
0
 public Search_Student()
 {
     InitializeComponent();
     label1.Hide();
     label2.Hide();
     label3.Hide();
     label4.Hide();
     label5.Hide();
     label6.Hide();
     label7.Hide();
     label8.Hide();
     label9.Hide();
     label10.Hide();
     label12.Hide();
     label13.Hide();
     btnEdit.Hide();
     btnDone.Hide();
     btnDelete.Hide();
     txtID.Hide();
     txtName.Hide();
     txtPassword.Hide();
     txtCGPA.Hide();
     txtAddress.Hide();
     txtContact.Hide();
     txtEmail.Hide();
     txtGuardian.Hide();
     radioFemale.Hide();
     radioMale.Hide();
     BGBox.Hide();
     DepartmentBox.Hide();
     datePicker.Hide();
     pictureBox.Hide();
 }
Example #2
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                DatabaseManager dm      = new DatabaseManager();
                string[]        student = dm.FindFaculty(searchBox.Text);
                txtID.Text       = student[0];
                txtName.Text     = student[1];
                txtPassword.Text = student[2];
                if (student[3] == "Male")
                {
                    radioMale.Checked = true;
                }
                else
                {
                    radioFemale.Checked = true;
                }

                BGBox.Text         = student[4];
                datePicker.Value   = Convert.ToDateTime(student[5]);
                DepartmentBox.Text = student[6];
                txtContact.Text    = student[7];
                txtEmail.Text      = student[8];
                txtAddress.Text    = student[9];
                pictureBox.Image   = Image.FromFile(student[10]);
                picURL             = student[10];
                label14.Hide();
                searchBox.Hide();
                btnSearch.Hide();
                label1.Show();
                label2.Show();
                label3.Show();
                label4.Show();
                label5.Show();
                label6.Show();
                label7.Show();
                label10.Show();
                label12.Show();
                label13.Show();
                btnEdit.Show();
                btnDelete.Show();
                btnBack.Location = new Point(440, 319);
                txtID.Show();
                txtName.Show();
                txtPassword.Show();
                txtAddress.Show();
                txtContact.Show();
                txtEmail.Show();
                radioFemale.Show();
                radioMale.Show();
                BGBox.Show();
                DepartmentBox.Show();
                datePicker.Show();
                pictureBox.Show();
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.Message);
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (GameModeLabel != null)
            {
                GameModeLabel.Dispose();
                GameModeLabel = null;
            }

            if (BGBox != null)
            {
                BGBox.Dispose();
                BGBox = null;
            }

            if (TextArea != null)
            {
                TextArea.Dispose();
                TextArea = null;
            }

            if (VerticalLine != null)
            {
                VerticalLine.Dispose();
                VerticalLine = null;
            }

            if (HorizontalLine != null)
            {
                HorizontalLine.Dispose();
                HorizontalLine = null;
            }

            if (AccuracyText != null)
            {
                AccuracyText.Dispose();
                AccuracyText = null;
            }

            if (SpeedText != null)
            {
                SpeedText.Dispose();
                SpeedText = null;
            }

            if (DurationText != null)
            {
                DurationText.Dispose();
                DurationText = null;
            }

            if (AccuracyNum != null)
            {
                AccuracyNum.Dispose();
                AccuracyNum = null;
            }

            if (SpeedNum != null)
            {
                SpeedNum.Dispose();
                SpeedNum = null;
            }

            if (DurationNum != null)
            {
                DurationNum.Dispose();
                DurationNum = null;
            }

            if (BGBoxWhite != null)
            {
                BGBoxWhite.Dispose();
                BGBoxWhite = null;
            }

            if (InputBox != null)
            {
                InputBox.Dispose();
                InputBox = null;
            }
        }