Example #1
0
        private TableContent GetRequestInfosTableContent()
        {
            var rows = (IList <RequestApplicantInfoRecord>)TemplateFieldValueFactory
                       .Create(TemplateFieldName.RequestInfosOfDocument_Complex).Get(Parameters);

            var tableContent = new TableContent(nameof(RequestApplicantInfoRecord));

            if (rows.Any())
            {
                foreach (var row in rows)
                {
                    tableContent.AddRow(
                        new FieldContent(nameof(RequestApplicantInfoRecord.RequestNum), row.RequestNum),
                        new FieldContent(nameof(RequestApplicantInfoRecord.PatentName), row.PatentName),
                        new FieldContent(nameof(RequestApplicantInfoRecord.DeclarantShortInfo), row.DeclarantShortInfo)
                        );
                }
            }
            else
            {
                tableContent.AddRow(
                    new FieldContent(nameof(RequestApplicantInfoRecord.RequestNum), string.Empty),
                    new FieldContent(nameof(RequestApplicantInfoRecord.PatentName), string.Empty),
                    new FieldContent(nameof(RequestApplicantInfoRecord.DeclarantShortInfo), string.Empty)
                    );
            }


            return(tableContent);
        }
Example #2
0
        private FieldContent GetTableTemplateContentCount()
        {
            var requestC = (IList <RequestApplicantInfoRecord>)TemplateFieldValueFactory
                           .Create(TemplateFieldName.RequestApplicantInfoRecords_Complex).Get(Parameters);

            return(new FieldContent("RequestCount", requestC.Count.ToString()));
        }
Example #3
0
        // Метод для строки
        private TableContent TableTemplateContent()
        {
            var rows = (IList <RequestApplicantInfoRecord>)TemplateFieldValueFactory
                       .Create(TemplateFieldName.RequestApplicantInfoRecords_Complex).Get(Parameters);

            var tableContent = new TableContent("RequestNTable");


            //List<string> rowsQ = new List<string>();
            //rowsQ.Add(TemplateFieldValueFactory
            //    .Create(TemplateFieldName.RequestNumber).Get(Parameters));
            //var rowIndex = 0;
            //foreach (var tableRow in rows)
            //{
            //    tableContent.AddRow(
            //        new FieldContent("RequestNum", tableRow.RequestNum),
            //        new FieldContent("Declarants", tableRow.Declarant),
            //        new FieldContent("RequestDate", tableRow.RequestDate.ToString()),
            //        new FieldContent("RowIncrement", (++rowIndex).ToString())
            //    );
            //}


            for (var i = 0; i < rows.Count; i++)

            {
                var tableRow = rows[i];


                tableContent.AddRow(
                    new FieldContent("RequestNum", tableRow.RequestNum),
                    new FieldContent("DeclarantShortInfo", tableRow.DeclarantShortInfo),
                    new FieldContent("RowIncrement", (i + 1).ToString()),
                    new FieldContent("RequestDate", tableRow.RequestDate)


                    );
            }

            return(tableContent);
        }