示例#1
0
        private void DoDetailedPage(string objectName, string paramName, string paramValue)
        {
            if (!String.IsNullOrEmpty(objectName))
            {
                Report currentReport    = CurrentTab.NeedParent ? Tabs[0].Report : Report;
                ReportComponentBase obj = currentReport.FindObject(objectName) as ReportComponentBase;
                if (obj != null && obj.Hyperlink.Kind == HyperlinkKind.DetailPage)
                {
                    ReportPage reportPage = currentReport.FindObject(obj.Hyperlink.DetailPageName) as ReportPage;
                    if (reportPage != null)
                    {
                        Data.Parameter param = currentReport.Parameters.FindByName(paramName);
                        if (param != null && param.ChildObjects.Count > 0)
                        {
                            string[] paramValues = paramValue.Split(obj.Hyperlink.ValuesSeparator[0]);
                            if (paramValues.Length > 0)
                            {
                                int i = 0;
                                foreach (Data.Parameter childParam in param.ChildObjects)
                                {
                                    childParam.Value = paramValues[i++];
                                    if (i >= paramValues.Length)
                                    {
                                        break;
                                    }
                                }
                            }
                        }
                        else
                        {
                            currentReport.SetParameterValue(paramName, paramValue);
                        }
                        PreparedPages oldPreparedPages = currentReport.PreparedPages;
                        PreparedPages pages            = new PreparedPages(currentReport);
                        currentReport.SetPreparedPages(pages);
                        currentReport.PreparePage(reportPage);
                        Report tabReport = new Report();
                        tabReport.SetPreparedPages(currentReport.PreparedPages);
                        Tabs.Add(new ReportTab()
                        {
                            Name           = paramValue,
                            Report         = tabReport,
                            ReportPrepared = true,
                            Closeable      = true,
                            NeedParent     = true
                        });

                        int prevTab = CurrentTabIndex;
                        currentReport.SetPreparedPages(oldPreparedPages);
                        CurrentTabIndex = Tabs.Count - 1;
                        //Prop.PreviousTab = prevTab;
                    }
                }
            }
        }
示例#2
0
        private void DoDetailedReport(string objectName, string paramName, string paramValue)
        {
            if (!String.IsNullOrEmpty(objectName))
            {
                Report tabReport        = new Report();
                ReportComponentBase obj = Report.FindObject(objectName) as ReportComponentBase;
                if (obj != null && obj.Hyperlink.Kind == HyperlinkKind.DetailReport)
                {
                    string fileName = obj.Hyperlink.DetailReportName;
                    if (File.Exists(fileName))
                    {
                        tabReport.Load(fileName);

                        Data.Parameter param = tabReport.Parameters.FindByName(paramName);
                        if (param != null && param.ChildObjects.Count > 0)
                        {
                            string[] paramValues = paramValue.Split(obj.Hyperlink.ValuesSeparator[0]);
                            if (paramValues.Length > 0)
                            {
                                int i = 0;
                                foreach (Data.Parameter childParam in param.ChildObjects)
                                {
                                    childParam.Value = paramValues[i++];
                                    if (i >= paramValues.Length)
                                    {
                                        break;
                                    }
                                }
                            }
                        }
                        else
                        {
                            tabReport.SetParameterValue(paramName, paramValue);
                        }
                        Report.Dictionary.ReRegisterData(tabReport.Dictionary);

                        tabReport.PreparePhase1();
                        tabReport.PreparePhase2();

                        Tabs.Add(new ReportTab()
                        {
                            Name           = paramValue,
                            Report         = tabReport,
                            ReportPrepared = true,
                            Closeable      = true,
                            NeedParent     = false
                        });

                        int prevTab = CurrentTabIndex;
                        CurrentTabIndex = Tabs.Count - 1;
                        //Prop.PreviousTab = prevTab;
                    }
                }
            }
        }
示例#3
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Parameter = await _context.Parameter
                        .Include(p => p.ParentParameter).FirstOrDefaultAsync(m => m.ParameterId == id);

            if (Parameter == null)
            {
                return(NotFound());
            }
            return(Page());
        }
示例#4
0
        public void MapDataFields(System.Data.DataRow currentRow)
        {
            WorkQueueViewId = (Int64)currentRow["WorkQueueViewId"];

            Sequence = (Int32)currentRow["Sequence"];


            // MAP BASE OBJECT PROPERTIES

            IgnoredValue = null;

            IsCaseSensitive = false;

            Operator = (Mercury.Server.Data.Enumerations.DataFilterOperator)Convert.ToInt32(currentRow ["FilterOperator"]);

            PropertyPath = (String)currentRow ["FieldName"];

            Parameter = new Data.Parameter();

            Parameter.Value = (String)currentRow["FilterValue"];

            return;
        }