コード例 #1
0
ファイル: ReportDAL.cs プロジェクト: maheshf/VWback
        public ReportSchema GetReportSchema(Guid reportSessionID, int reportID)
        {
            var                 reportSchema     = new ReportSchema();
            ObjectParameter     reportName       = new ObjectParameter("reportName", typeof(string));
            var                 reportParameters = dbContext.GetReportParameters(reportSessionID, reportID, reportName);
            List <SqlParameter> paramList        = new List <SqlParameter>();
            var                 report           = dbContext.tbl_PM_reportMaster.Where(t => t.reportID == reportID).FirstOrDefault();

            foreach (var reportParam in reportParameters)
            {
                var param = new SqlParameter("@" + reportParam.reportParamName, reportParam.inputType);
                param.Value = reportParam.reportParamValue;
                if (reportParam.reportParamName == "LoggedInUser" || reportParam.reportParamName == "LoggedInEmployee")
                {
                    param.Value = Membership.GetUser().UserName;
                }

                paramList.Add(param);
            }

            reportSchema.Name              = report.reportName;
            reportSchema.ProcName          = report.rptSPName;
            reportSchema.FileName          = report.rptFileName;
            reportSchema.ProcInputItemList = paramList;

            return(reportSchema);
        }
コード例 #2
0
 public HorizontalReportSchema <TSourceEntity> BuildSchema()
 {
     return(ReportSchema <TSourceEntity> .CreateHorizontal(
                this.CellsProviders
                .Select(
                    r => new ReportSchemaCellsProvider <TSourceEntity>(
                        r.Provider,
                        r.CellProperties.ToArray(),
                        r.HeaderProperties.ToArray(),
                        r.CellProcessors.ToArray(),
                        r.HeaderProcessors.ToArray()))
                .ToArray(),
                this.GlobalProperties.ToArray(),
                this.TableProperties.ToArray(),
                this.ComplexHeaders.ToArray(),
                this.ComplexHeadersProperties
                .ToDictionary(x => x.Key, x => x.Value.ToArray()),
                this.headerProviders
                .Select(
                    r => new ReportSchemaCellsProvider <TSourceEntity>(
                        r.Provider,
                        r.CellProperties.ToArray(),
                        r.HeaderProperties.ToArray(),
                        r.CellProcessors.ToArray(),
                        r.HeaderProcessors.ToArray()))
                .ToArray(),
                this.CommonComplexHeadersProperties.ToArray()));
 }
コード例 #3
0
        public IActionResult GetSchema(ReportRequest request)
        {
            var client = new SAWSessionServiceSoapClient(SAWSessionServiceSoapClient.EndpointConfiguration.SAWSessionServiceSoap, _config.GetValue <string>("SessionServiceUrl"));
            //var session = client.logonAsync("oracle.admin", "Burger01!").Result;
            var session = client.logonAsync("tperluss", "7Xo34%GN1XTZ94TI4cMT").Result;

            var svc = new XmlViewServiceSoapClient(XmlViewServiceSoapClient.EndpointConfiguration.XmlViewServiceSoap, _config.GetValue <string>("XmlServiceUrl"));

            request.ReportPath = HttpUtility.UrlDecode(request.ReportPath);

            var report = new ReportRef
            {
                reportPath = request.ReportPath
            };

            var output = svc.executeXMLQueryAsync(report, XMLQueryOutputFormat.SAWRowsetSchema, new XMLQueryExecutionOptions(), new ReportParams(), session.sessionID).Result;

            var schema = Deserialize <rowsetschema>([email protected]("http://www.w3.org/2001/XMLSchema", "http://www.w3.org/2001/WB"));

            var resp = new ReportSchema {
                Columns = new List <ColumnSchema>(), ReportPath = request.ReportPath
            };

            schema.schema.complexType.sequence.ToList().ForEach(a => {
                resp.Columns.Add(new ColumnSchema {
                    ColumnId       = a.columnID,
                    IsDoubleColumn = a.isDoubleColumn,
                    MaxOccurs      = a.maxOccurs,
                    MinOccurs      = a.minOccurs,
                    Name           = a.name,
                    TableHeading   = a.tableHeading,
                    ColumnHeading  = a.columnHeading,
                    Type           = a.type.Replace("xsd:", ""),
                    SqlType        = a.type1
                });
            });

            return(Ok(resp));
        }
コード例 #4
0
 public GraphQlController(ReportSchema schema, IDocumentExecuter de)
 {
     //this.blogService = blogService;
     _reportSchema = schema;
     _de           = de;
 }