Beispiel #1
0
        private static void ProcessSubmit(HttpContextBase httpContext)
        {
            var reportId = httpContext.Request.Form["ReportId"];

            if (string.IsNullOrEmpty(reportId))
            {
                return;
            }

            if (Err.Configuration.UserInteraction.AskUserForPermission)
            {
                var value = httpContext.Request.Form[nameof(CoderrViewModel.UserAllowedReporting)]?.ToLower();
                if (httpContext.Request.Form["Allowed"] != "true" && value != "true")
                {
                    return;
                }

                // report have been sent in the previous HTTP post for other cases.
                var report = TempData[reportId];
                if (report != null)
                {
                    Err.Configuration.Uploaders.Upload((ErrorReportDTO)report);
                }
            }


            var description = httpContext.Request.Form["Description"] ?? httpContext.Request.Form[nameof(CoderrViewModel.UserErrorDescription)];
            var email       = httpContext.Request.Form["Email"] ?? httpContext.Request.Form[nameof(CoderrViewModel.UserEmailAddress)];

            if (!string.IsNullOrEmpty(email) || !string.IsNullOrEmpty(description))
            {
                Err.LeaveFeedback(reportId, new UserSuppliedInformation(description, email));
            }
        }
        private void Submit_Click(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 (Err.Configuration.UserInteraction.AskUserForPermission)
            {
                Err.UploadReport(_dto);
            }

            if (!string.IsNullOrEmpty(info) || !string.IsNullOrEmpty(email))
            {
                Err.LeaveFeedback(_dto.ReportId, new UserSuppliedInformation(info, email));
            }

            Close();
        }
Beispiel #3
0
        static void Main()
        {
            var log = CreateLogger();

            log.Info("Starting application");

            var url = new Uri("http://*****:*****@gauffin.com", "This is what I did: NOTHING!");
            }

            return;

            Err.ReportLogicError("User should have been assigned.", errorId: "MainN");

            ThrowImportantError();
            Console.WriteLine("Hello World!");
        }
 private void Button1_Click(object sender, System.EventArgs e)
 {
     Err.LeaveFeedback(_context.Report.ReportId, textBox1.Text, null);
 }