Exemplo n.º 1
0
        public void dismissSecretaryTest()
        {
            CHeadOfDepartment hod = new CHeadOfDepartment("test", "test", "test", "test", "test");
            CSecretary        s   = new CSecretary("test", "test", "test", "test", "test");

            hod.addSecretary(s.Id, s.Name);
            hod.dismissSecretary(s.Id);
            DataTable dt = Program.get_dt("SELECT id from login WHERE Id='test'");

            Assert.IsTrue(dt.Rows.Count == 0);
        }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 { /*dismiss sercretary and remove from data base*/
     if (idText.Text.Count() != 0)
     {
         if (Hod.dismissSecretary(idText.Text.ToString()))
         {
             MessageBox.Show("deleted succesfully");
         }
         else
         {
             MessageBox.Show("Id not found");
         }
     }
     else
     {
         MessageBox.Show("Must enter id");
     }
 }