Ejemplo n.º 1
0
    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");


    }
Ejemplo n.º 2
0
    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");
    }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Context.Items["ReportId"] != null)
     {
         Page.ViewState["ReportId"] = Context.Items["ReportId"];
         reportsManager             = new ReportsManager(this);
         showReport(reportsManager.GetReport((Int32)Page.ViewState["ReportId"]));
     }
 }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Context.Items["ReportId"] != null)
        {
            Page.ViewState["ReportId"] = Context.Items["ReportId"];
            reportsManager = new ReportsManager(this);
            showReport(reportsManager.GetReport((Int32)Page.ViewState["ReportId"]));
        }

    }