示例#1
0
 private void ShowReportTablesSchema()
 {
     reportsManager     = new ReportsManager(this);
     reportTablesSchema = reportsManager.GetTableSchema(reportTablesSchemaId);
     txtName.Text       = reportTablesSchema.Name;
     txtSqltext.Text    = reportTablesSchema.SqlText;
 }
示例#2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            ReportTablesSchema original_reportTablesSchema = new ReportTablesSchema();

            reportsManager     = new ReportsManager(this);
            reportTablesSchema = new ReportTablesSchema();

            if (reportTablesSchemaId != 0)
            {
                original_reportTablesSchema = reportsManager.GetTableSchema(reportTablesSchemaId);
                reportTablesSchema.CopyPropertiesFrom(original_reportTablesSchema);
            }

            reportTablesSchema.Name    = txtName.Text;
            reportTablesSchema.SqlText = txtSqltext.Text;

            if (reportTablesSchemaId != 0)
            {
                reportsManager.Update(original_reportTablesSchema, reportTablesSchema);
            }
            else
            {
                reportsManager.Insert(reportTablesSchema);
                Response.Redirect("DynamicReport.aspx?ReportTablesSchemaId=" + reportTablesSchema.ReportTablesSchemaId);
            }


            // Server.Transfer("dynamicReports.aspx");
            // Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "location='Customer.aspx?CustomerId=" + customer.CustomerId + "';", true);
        }