public void show_info()
 {
     name_label.Text = "Welcome, " + user.SDEGREE() + user.FIRSTNAME + " " + user.LASTNAME + "\nSecretary of " + user.SDEPT() + " Engineering Department.";
 }
        //Methods-------------------------------------------------------------------------------------------//
        public F_Register()
        {
            InitializeComponent();
            user = (Secretary)db.USER;

            if (user != null)
            {
                Point pt = new Point();

                type_box.Hide();
                label6.Hide();

                dept_box.Hide();
                label10.Hide();

                type_box.Items.Add("Student");
                type_box.SelectedIndex = 0;
                dept_box.Items.Add(user.SDEPT());
                dept_box.SelectedIndex = 0;
                grade_label.Show();
                grade_box.Show();

                WindowState     = FormWindowState.Normal;
                StartPosition   = FormStartPosition.CenterScreen;
                FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;

                // password label
                pt = label2.Location;
                pt.Offset(0, 20);
                label2.Location = pt;
                // password box
                pt = pass_box.Location;
                pt.Offset(0, 20);
                pass_box.Location = pt;
                // id label
                pt = label3.Location;
                pt.Offset(0, 40);
                label3.Location = pt;
                // id box
                pt = id_box.Location;
                pt.Offset(0, 40);
                id_box.Location = pt;
                // firstname label
                pt = label4.Location;
                pt.Offset(0, 60);
                label4.Location = pt;
                // firstname box
                pt = fname_box.Location;
                pt.Offset(0, 60);
                fname_box.Location = pt;
                // lastname label
                pt = label5.Location;
                pt.Offset(0, 80);
                label5.Location = pt;
                // lastname box
                pt = lname_box.Location;
                pt.Offset(0, 80);
                lname_box.Location = pt;
                // email label
                pt = label8.Location;
                pt.Offset(0, 100);
                label8.Location = pt;
                // email box
                pt = mail_box.Location;
                pt.Offset(0, 100);
                mail_box.Location = pt;
                //phone label
                pt = label8.Location;
                pt.Offset(0, 46);
                label9.Location = pt;
                //phone box
                pt = mail_box.Location;
                pt.Offset(0, 46);
                phon_box.Location = pt;
                phon_box.Size     = mail_box.Size;
                //m radio
                pt = phon_box.Location;
                pt.Offset(6, 46);
                m_radio.Location = pt;
                //f radio
                pt = m_radio.Location;
                pt.Offset(62, 0);
                f_radio.Location = pt;
                //gender label
                pt = label9.Location;
                pt.Offset(0, 46);
                label7.Location = pt;
                //grade label
                pt = label7.Location;
                pt.Offset(-5, 40);
                grade_label.Location = pt;
                //grade box
                pt = phon_box.Location;
                pt.Offset(1, 86);
                grade_box.Location = pt;
                grade_box.Size     = mail_box.Size;
                //ok button
                pt = grade_label.Location;
                pt.Offset(-10, 40);
                ok_button.Location = pt;
                //exit button
                pt = ok_button.Location;
                pt.Offset(120, 0);
                ex_button.Location = pt;

                stud_dept = user.DEPT;
            }

            else
            {
                type_box.Show();
                label6.Show();
                dept_box.Show();
                label10.Show();

                grade_label.Hide();
                grade_box.Hide();

                type_box.Items.AddRange(new object[] {
                    "Tutor",
                    "Lecturer",
                    "Secretary",
                    "Head of a Department"
                });
                dept_box.Items.AddRange(new object[] {
                    "Software",
                    "Electronic",
                    "Civil",
                    "Chemistry",
                    "Industrial-Management",
                    "Machines"
                });
            }
        }