Esempio n. 1
0
        private void btnFaxReport_Click(object sender, EventArgs e)
        {
            btnFaxReport.DisableServerSideValidation();

            string faxNumber = cboFaxNumber.Text;

            // As the value is appended to the end of the display value, if the text property does not end with value, a custom fax number has
            // been supplied - in which case we should not use the value and use the text property that has already been picked up.
            if (cboFaxNumber.SelectedValue != string.Empty)
            {
                faxNumber = cboFaxNumber.SelectedValue;
            }

            this.txtFaxNumber.Text = faxNumber;

            this.rfvFaxNumber.Validate();
            this.revFaxNumber.Validate();

            if (Page.IsValid)
            {
                var reportExporter = new ActiveReportExporter();

                                #if DEBUG
                lblConfirmation.Text = "Fax Not sent, in Debug mode";
                                #else
                lblConfirmation.Text = reportExporter.FaxReport(faxNumber);
                                #endif

                lblConfirmation.Visible = true;
            }
        }
Esempio n. 2
0
        private void btnEmailReport_Click(object sender, EventArgs e)
        {
            btnEmailReport.DisableServerSideValidation();

            string emailAddress = this.cboEmail.Text;

            if (this.cboEmail.SelectedValue != String.Empty)
            {
                emailAddress = this.cboEmail.SelectedValue;
            }

            this.txtEmail.Text = emailAddress;

            this.rfvEmailAddress.Validate();
            this.revEmailAddress.Validate();

            if (Page.IsValid)
            {
                var reportExporter = new ActiveReportExporter();

                bool sent = false;

                sent = reportExporter.EmailReport(emailAddress);

                if (sent)
                {
                    lblConfirmation.Text = "Your report has been emailed.";
                }
                else
                {
                    lblConfirmation.Text = "Your report has not been emailed.";
                }

                lblConfirmation.Visible = true;
            }
        }
Esempio n. 3
0
        private void btnExcelReport_Click(object sender, EventArgs e)
        {
            var reportExporter = new ActiveReportExporter();

            reportExporter.ExecuteReportExcel();
        }