Ejemplo n.º 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));
            }
        }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (enterintoLoadEvent.IsFalse())
         {
             return;
         }
         if (IsPostBack.IsFalse())
         {
             errorList        = new CustomList <ErrorList>();
             btnEmail.Visible = false;
             FilterSetList    = new CustomList <FilterSets>();
             FilterValueList  = new CustomList <ParameterFilterValue>();
             REPORT.BLL.ReportSuite reportSuite = new REPORT.BLL.ReportSuite(STATIC.ConnectionName.HR);
             string empcode = Request.QueryString.Get("empCode");
             string empKey  = Request.QueryString.Get("EmpKey");
             if (empcode.IsNullOrEmpty())
             {
                 //ReportMenuList = reportSuite.GetReportSuiteMenu(CurrentUserSession.UserCode);
                 ReportMenuList = reportSuite.GetReportSuiteMenu();
             }
             else
             {
                 ReportMenuList = reportSuite.GetReportSuiteMenu();
             }
             LoadMenu();
             treeMenu.CollapseAll();
             if (treeMenu.Nodes.Count > 0)
             {
                 treeMenu.Nodes[0].Expand();
             }
         }
     }
     catch (Exception ex)
     {
         //Message.ShowErrorMessage("Error: <br>" + ex.Message + "<br>Call Stack: <br>" + ex.StackTrace);
     }
 }
Ejemplo n.º 3
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));
            }
        }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (enterintoLoadEvent.IsFalse()) return;
         if (IsPostBack.IsFalse())
         {
             errorList = new CustomList<ErrorList>();
             btnEmail.Visible = false;
             FilterSetList = new CustomList<FilterSets>();
             FilterValueList = new CustomList<ParameterFilterValue>();
             REPORT.BLL.ReportSuite reportSuite = new REPORT.BLL.ReportSuite(STATIC.ConnectionName.HR);
             string empcode = Request.QueryString.Get("empCode");
             string empKey = Request.QueryString.Get("EmpKey");
             if (empcode.IsNullOrEmpty())
             {
                 //ReportMenuList = reportSuite.GetReportSuiteMenu(CurrentUserSession.UserCode);
                 ReportMenuList = reportSuite.GetReportSuiteMenu();
             }
             else
             {
                 ReportMenuList = reportSuite.GetReportSuiteMenu();
             }
             LoadMenu();
             treeMenu.CollapseAll();
             if (treeMenu.Nodes.Count > 0)
                 treeMenu.Nodes[0].Expand();
         }
     }
     catch (Exception ex)
     {
         //Message.ShowErrorMessage("Error: <br>" + ex.Message + "<br>Call Stack: <br>" + ex.StackTrace);
     }
 }