Example #1
0
        protected void treeMenu_SelectedNodeChanged(object sender, EventArgs e)
        {
            try
            {
                if (treeMenu.SelectedNode.IsNotNull() && treeMenu.SelectedNode.ImageToolTip.IsNotNullOrEmpty())
                {
                    REPORT.BLL.ReportSuite reportSuite = new REPORT.BLL.ReportSuite(STATIC.ConnectionName.HR);
                    String reportPath = String.Empty;
                    reportPath            = AppDomain.CurrentDomain.BaseDirectory + "ASTReports\\" + treeMenu.SelectedNode.ImageToolTip;
                    Session["reportPath"] = reportPath;
                    if (System.IO.File.Exists(reportPath).IsFalse())
                    {
                        Response.Write("File does not exist.");
                        return;
                    }

                    ParameterValues = new DataSet();
                    ParameterValues = reportSuite.LoadReportParameterInfoFromDB(treeMenu.SelectedNode.Value.ToInt());
                    ParameterValues.Tables[0].TableName = ParamTableName;

                    Session["ReportID"] = treeMenu.SelectedNode.Value.ToString();

                    Int32 reportID = reportSuite.CheckMailExist(treeMenu.SelectedNode.Value.ToString());
                    if (reportID == 0)
                    {
                        btnEmail.Visible = false;
                    }
                    else
                    {
                        btnEmail.Visible = true;
                    }

                    SubReportList = new List <RDLReportDocument>();
                    Report        = new RDLReportDocument(treeMenu.SelectedNode.Text);
                    Report.ReportPathWithOutName = treeMenu.SelectedNode.ToolTip;
                    Report.Load(reportPath);
                    Report.LoadFilterTable(ParameterValues.Tables[ParamTableName].Columns);
                    FilterSetList = Report.FilterSetList;
                }
            }
            catch (Exception ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getExceptionMessage(ex));
            }
        }
Example #2
0
        protected void treeMenu_SelectedNodeChanged(object sender, EventArgs e)
        {
            try
            {
                if (treeMenu.SelectedNode.IsNotNull() && treeMenu.SelectedNode.ImageToolTip.IsNotNullOrEmpty())
                {
                    REPORT.BLL.ReportSuite reportSuite = new REPORT.BLL.ReportSuite(STATIC.ConnectionName.HR);
                    String reportPath = String.Empty;
                    reportPath = AppDomain.CurrentDomain.BaseDirectory + "ASTReports\\" + treeMenu.SelectedNode.ImageToolTip;
                    Session["reportPath"] = reportPath;
                    if (System.IO.File.Exists(reportPath).IsFalse())
                    {
                        Response.Write("File does not exist.");
                        return;
                    }

                    ParameterValues = new DataSet();
                    ParameterValues = reportSuite.LoadReportParameterInfoFromDB(treeMenu.SelectedNode.Value.ToInt());
                    ParameterValues.Tables[0].TableName = ParamTableName;

                    Session["ReportID"] = treeMenu.SelectedNode.Value.ToString();

                    Int32 reportID = reportSuite.CheckMailExist(treeMenu.SelectedNode.Value.ToString());
                    if (reportID == 0)
                    {
                        btnEmail.Visible = false;
                    }
                    else
                    {
                        btnEmail.Visible = true;
                    }

                    SubReportList = new List<RDLReportDocument>();
                    Report = new RDLReportDocument(treeMenu.SelectedNode.Text);
                    Report.ReportPathWithOutName = treeMenu.SelectedNode.ToolTip;
                    Report.Load(reportPath);
                    Report.LoadFilterTable(ParameterValues.Tables[ParamTableName].Columns);
                    FilterSetList = Report.FilterSetList;
                }
            }
            catch (Exception ex)
            {
                ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getExceptionMessage(ex));
            }
        }