Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Employee          empl = RetriveEmployeeInformation();
            EmployeeDBManager edbm = new EmployeeDBManager();

            edbm.DeleteEmployee(empl);
        }
Esempio n. 2
0
 private void buttonView_Click(object sender, EventArgs e)
 {
     try
     {
         EmployeeDBManager edbm = new EmployeeDBManager();
         dataGridViewEmployees.DataSource = edbm.RetrieveEmployees();
         //EmptyControls();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
         throw;
     }
 }
Esempio n. 3
0
        private void buttonReport_Click(object sender, EventArgs e)
        {
            EmployeeDBManager edbm  = new EmployeeDBManager();
            DateTime          start = textBoxStartDate.Value;
            DateTime          end   = textBoxEndDate.Value;

            Console.Write("" + start + end + "\n");
            int id = Convert.ToInt32(textBoxEmplID.Text);
            IList <EmployeeActivity> emplActivityList = edbm.RetrieveEmployeeActivity(id, start, end);

            if (emplActivityList.Count > 0)
            {
                string message = edbm.generateReport(emplActivityList);
                MessageBox.Show(message);
            }
            else
            {
                MessageBox.Show("No activity for this user");
            }
        }