private void OnRequest(object sender, EventArgs e) { var app = (HttpApplication)sender; if (!app.Request.Url.AbsoluteUri.ToLower().Contains("/onetrueerror/")) return; var reportId = app.Request.Form["reportId"]; if (string.IsNullOrEmpty(reportId)) return; var reportDTO = (ErrorReportDTO)TempData[reportId]; //Not allowed to upload report. if (app.Request.Form["Allowed"] != "true" && OneTrue.Configuration.UserInteraction.AskUserForPermission) { // accessor removes it. return; } if (reportDTO != null) OneTrue.UploadReport(reportDTO); var info = new UserSuppliedInformation(app.Request.Form["Description"], app.Request.Form["email"]); if (!string.IsNullOrEmpty(info.Description) || !string.IsNullOrEmpty(info.EmailAddress)) { OneTrue.LeaveFeedback(reportId, info); } app.Response.Redirect("~/"); app.Response.End(); }
private void ReportToOneTrue() { var info = UserErrorDescription.UserDescription; var email = NotificationControl.Email; // only upload it if the flag is set, it have already been uploaded otherwise. if (AskForUserPermission) { OneTrue.UploadReport(_dto); } if (!string.IsNullOrEmpty(info) || !string.IsNullOrEmpty(email)) { OneTrue.LeaveFeedback(_dto.ReportId, new UserSuppliedInformation(info, email)); } }
private void btnSubmit_Click_1(object sender, EventArgs e) { var info = errorDescription1.UserInfo; var email = notificationControl1.Email; // only upload it if the flag is set, it have already been uploaded otherwise. if (OneTrue.Configuration.UserInteraction.AskUserForPermission) { OneTrue.UploadReport(_dto); } if (!string.IsNullOrEmpty(info) || !string.IsNullOrEmpty(email)) { OneTrue.LeaveFeedback(_dto.ReportId, new UserSuppliedInformation(info, email)); } Close(); }