public static bool Enrol() { try { Enrol request; EnrolResponse response = null; // Build Request Presentation.UpdateStatus("Enrolling Device", "Building enrolment request and preparing to send data to the server.", true, -1); request = new Enrol(); request.Build(); // Send Request Presentation.UpdateStatus("Enrolling Device", "Sending the enrolment request to the server.", true, -1); response = request.Post(Program.IsAuthenticated); // Process Response Presentation.UpdateStatus("Enrolling Device", "Processing the enrolment response from the server.", true, -1); response.Process(); // Complete return true; } catch (Exception ex) { ErrorReporting.ReportError(ex, true); return false; } }