public ActionResult Execute(DeviceSelectionViewModel model)
        {
            string err = null;
            // get the ids of the items selected:
            List<long> selectedIds = model.getSelectedIds();

            // Use the ids to retrieve the records for the selected people
            // from the database:
            var selectedDevices = from x in db.Devices
                                  where selectedIds.Contains(x.ID)
                                  select x;

            switch(model.SelectedFunction)
            {
                case funcPrepareTaskerFile:
                    err = CreateDeviceTemplate(selectedDevices);
                    break;
            }

            return RedirectToAction("Index", new { err = err });
        }