private void btnSave_Click(object sender, EventArgs e) { var agencyReportRequest = new AgencyReportRequest(); agencyReportRequest.ServiceType = "flights"; agencyReportRequest.OrganizationCode = _orgcode; agencyReportRequest.BeginDate = calFrom.DateTime; agencyReportRequest.EndDate = calTo.DateTime; splashScreenManager1.ShowWaitForm(); try { DataProcessor.CreateReport(null, cbFormat.EditValue.ToString(), null, "agentreport", agencyReportRequest); } finally { splashScreenManager1.CloseWaitForm(); } this.DialogResult = DialogResult.OK; }