//private ChooseHoursToWork_Form hoursToWork;

        public TeachingAssist_Form(ref TeachingAssistant t, LoginForm loginForm)
        {
            teachingAssist = t;
            emp            = this.teachingAssist;
            this.loginForm = loginForm;
            InitializeComponent();
        }
        private void TeachingAssistant_Menu_Click(object sender, EventArgs e)
        {
            TeachingAssistant temp = new TeachingAssistant();

            this.teachingAssistForm = new TeachingAssist_Form(ref temp, null);
            this.Hide();
            teachingAssistForm.FormClosed += new FormClosedEventHandler(teachingAssistForm_FormClosed);
            teachingAssistForm.ShowDialog();
        }
        private void Lecturer_Menu_Click(object sender, EventArgs e)
        {
            Lecturer          lecturer       = new Lecturer();
            TeachingAssistant teachingAssist = new TeachingAssistant();

            this.lecturerForm = new Lecturer_Form(ref lecturer, null);//, ref teachingAssist);
            this.Hide();
            lecturerForm.FormClosed += new FormClosedEventHandler(lecturerForm_FormClosed);
            lecturerForm.ShowDialog();
        }
        private void AddNewTeachingAssist_button_Click(object sender, EventArgs e)
        {
            /*AddNewTeachingAssistantForm regForm = new AddNewTeachingAssistantForm();
             * regForm.FormClosed += new FormClosedEventHandler(FormClosedHandling);
             * regForm.ShowDialog();
             * regForm.CallBasicUserRegisteration();
             * //regForm = null;
             */
            this.Hide();

            //BasicUser newUser = null;
            //BasicUser_Registration_Form regForm = new BasicUser_Registration_Form(ref newUser);
            this.teachingAssist           = new TeachingAssistant();
            this.teachingAssist.FirstName = "empty";
            BasicUser temp = (BasicUser)this.teachingAssist;
            BasicUser_Registration_Form regForm = new BasicUser_Registration_Form(ref temp);

            regForm.FormClosed += new FormClosedEventHandler(FormClosedHandling);
            regForm.ShowDialog();

            if (temp != null)
            {
                String tempt = "The new user details: FirstName:" + temp.FirstName + ", lastname:" + temp.LastName + ",password:"******"INSERT INTO TeachingAssistantTable (firstName, lastName, id, age, userName,password) VALUES(%s, %s, %s, %d, %s, %s)", temp.FirstName, temp.LastName, temp.Id, temp.Age, temp.Username, temp.Password);
                 * //sql = "SELECT * FROM TeachingAssistantTable";
                 *
                 * command = new SqlCommand(sql, conn);
                 *  adapter.SelectCommand = command;
                 *  adapter.Fill(ds);
                 *  adapter.Dispose();
                 *  command.Dispose();
                 *
                 *  String result = "";
                 *  for (i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
                 *  {
                 *      result+= (ds.Tables[0].Rows[i].ItemArray[0]
                 + "--" + ds.Tables[0].Rows[i].ItemArray[1]
                 + "--" + ds.Tables[0].Rows[i].ItemArray[2]
                 + "--" + ds.Tables[0].Rows[i].ItemArray[3]
                 + "--" + ds.Tables[0].Rows[i].ItemArray[4]
                 + "--" + ds.Tables[0].Rows[i].ItemArray[5]
                 + "\n");
                 +
                 +  }
                 */
                // --------------------------------------------------------------------
            }
        }
 public TeachingAssist_Form()
 {
     teachingAssist = null;
     InitializeComponent();
 }