public void DeleteDepartment()
 {
     Task.Run(() =>
     {
         try
         {
             DepartmentRepository.DeleteDepartmentByID(Department.DepartmentID);
             Department   = null;
             Name         = "";
             GroupName    = "";
             ModifiedDate = DateTime.Now;
             Refresh();
             ShowPopupWindow("Department deleted successfully.");
         }
         catch (Exception e)
         {
             ShowPopupWindow("Deleting department failed.\nERROR: " + e.Message);
         }
     });
 }