protected void btnSave_Click(object sender, EventArgs e) { reportsManager = new ReportsManager(this); Report original_report, report; original_report = new Report(); report = new Report(); if (Page.ViewState["ReportId"] != null) { original_report = reportsManager.GetReport((Int32)Page.ViewState["ReportId"]); report.CopyPropertiesFrom(original_report); } report.Name = txtName.Text; report.ReportUrl = txtReportUrl.Text; if (!String.IsNullOrEmpty(cboReportTablesSchemaId.SelectedValue)) report.ReportTablesSchemaId = Convert.ToInt32(cboReportTablesSchemaId.SelectedValue); if (original_report.ReportId != 0) reportsManager.UpdateReport(original_report, report); else reportsManager.InsertReport(report); Server.Transfer("reports.aspx"); }
protected void btnSave_Click(object sender, EventArgs e) { reportsManager = new ReportsManager(this); Report original_report, report; original_report = new Report(); report = new Report(); if (Page.ViewState["ReportId"] != null) { original_report = reportsManager.GetReport((Int32)Page.ViewState["ReportId"]); report.CopyPropertiesFrom(original_report); } report.Name = txtName.Text; report.ReportUrl = txtReportUrl.Text; if (!String.IsNullOrEmpty(cboReportTablesSchemaId.SelectedValue)) { report.ReportTablesSchemaId = Convert.ToInt32(cboReportTablesSchemaId.SelectedValue); } if (original_report.ReportId != 0) { reportsManager.UpdateReport(original_report, report); } else { reportsManager.InsertReport(report); } Server.Transfer("reports.aspx"); }