当前位置: 首页>>代码示例>>C#>>正文


C# TParameterList.ConvertToFormattedStrings方法代码示例

本文整理汇总了C#中Ict.Petra.Shared.MReporting.TParameterList.ConvertToFormattedStrings方法的典型用法代码示例。如果您正苦于以下问题:C# TParameterList.ConvertToFormattedStrings方法的具体用法?C# TParameterList.ConvertToFormattedStrings怎么用?C# TParameterList.ConvertToFormattedStrings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ict.Petra.Shared.MReporting.TParameterList的用法示例。


在下文中一共展示了TParameterList.ConvertToFormattedStrings方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TGridPreview

 /// <summary>
 /// constructor
 /// </summary>
 public TGridPreview(Form APreviewForm,
     TFrmPetraUtils APetraUtilsObject,
     TPreviewDelegate APreviewDelegate,
     TResultList AResultList,
     TParameterList AParameters)
 {
     results = AResultList.ConvertToFormattedStrings(AParameters);
     FOrigParameters = AParameters;
     parameters = AParameters.ConvertToFormattedStrings();
     FPreviewForm = APreviewForm;
     FPetraUtilsObject = APetraUtilsObject;
     FPreviewDelegate = APreviewDelegate;
     FGenerateReportThread = null;
 }
开发者ID:Davincier,项目名称:openpetra,代码行数:17,代码来源:GridPreview.cs

示例2: TReportPrinterCommon

 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="AResult"></param>
 /// <param name="AParameters"></param>
 /// <param name="APrinter"></param>
 public TReportPrinterCommon(TResultList AResult, TParameterList AParameters, TPrinter APrinter)
 {
     // go through all results and parameters and replace the unformatted and encoded date
     // the whole point is to format the dates differently, depending on the output (printer vs. CSV)
     FParameters = AParameters.ConvertToFormattedStrings("Localized");
     FResultList = AResult.ConvertToFormattedStrings(FParameters, "Localized");
     FResults = FResultList.GetResults();
     FLowestLevel = FParameters.Get("lowestLevel").ToInt();
     FTimePrinted = DateTime.Now;
     FPrinter = APrinter;
 }
开发者ID:Davincier,项目名称:openpetra,代码行数:17,代码来源:PrinterCommon.cs

示例3: TReportExcel

 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="AResultList"></param>
 /// <param name="AParameters"></param>
 public TReportExcel(TResultList AResultList, TParameterList AParameters)
 {
     results = AResultList.ConvertToFormattedStrings(AParameters, "CSV");
     parameters = AParameters.ConvertToFormattedStrings("CSV");
 }
开发者ID:Davincier,项目名称:openpetra,代码行数:10,代码来源:Excel.cs

示例4: String

        /// <summary>
        /// This returns the resultlist as lines for a CSV file
        /// </summary>
        /// <param name="AParameters"></param>
        /// <param name="separator">if this has the value FIND_BEST_SEPARATOR,
        /// then first the parameters will be checked for CSV_separator, and if that parameter does not exist,
        /// then the CurrentCulture is checked, for the local language settings</param>
        /// <param name="ADebugging">if true, thent the currency and date values are written encoded, not localized</param>
        /// <param name="AExportOnlyLowestLevel">if true, only the lowest level of AParameters are exported (level with higest depth)
        /// otherwise all levels in AParameter are exported</param>
        /// <returns>the lines to be written to the CSV file</returns>
        public List <string>WriteCSVInternal(TParameterList AParameters,
            string separator = "FIND_BEST_SEPARATOR",
            Boolean ADebugging = false,
            Boolean AExportOnlyLowestLevel = false)
        {
            List <string>lines = new List <string>();
            int i;
            string strLine;
            ArrayList sortedList;
            bool display;
            bool useIndented;
            TParameterList FormattedParameters;
            TResultList FormattedResult;

            // myEncoding: Encoding;
            // bytes: array of byte;
            if (separator == "FIND_BEST_SEPARATOR")
            {
                if (AParameters.Exists("CSV_separator"))
                {
                    separator = AParameters.Get("CSV_separator").ToString();

                    if (separator.ToUpper() == "TAB")
                    {
                        separator = new String((char)9, 1);
                    }
                    else if (separator.ToUpper() == "SPACE")
                    {
                        separator = " ";
                    }
                }
                else
                {
                    separator = CultureInfo.CurrentCulture.TextInfo.ListSeparator;
                }
            }

            if (ADebugging == false)
            {
                FormattedParameters = AParameters.ConvertToFormattedStrings("CSV");
                FormattedResult = ConvertToFormattedStrings(FormattedParameters, "CSV");
            }
            else
            {
                FormattedParameters = AParameters;
                FormattedResult = this;
            }

            // write headings
            strLine = "";

            // for debugging:
            // strLine = StringHelper.AddCSV(strLine, "masterRow", separator);
            // strLine = StringHelper.AddCSV(strLine, "childRow", separator);
            // strLine = StringHelper.AddCSV(strLine, "depth", separator);

            strLine = StringHelper.AddCSV(strLine, "id", separator);

            if (FormattedParameters.Exists("ControlSource", ReportingConsts.HEADERPAGELEFT1,
                    -1, eParameterFit.eBestFit))
            {
                strLine = StringHelper.AddCSV(strLine, FormattedParameters.Get("ControlSource",
                        ReportingConsts.HEADERPAGELEFT1,
                        -1, eParameterFit.eBestFit).ToString(), separator);
            }

            if (FormattedParameters.Exists("ControlSource", ReportingConsts.HEADERPAGELEFT2,
                    -1, eParameterFit.eBestFit))
            {
                strLine = StringHelper.AddCSV(strLine, FormattedParameters.Get("ControlSource",
                        ReportingConsts.HEADERPAGELEFT2,
                        -1, eParameterFit.eBestFit).ToString(), separator);
            }

            if (FormattedParameters.Exists("ControlSource", ReportingConsts.HEADERCOLUMN,
                    -1, eParameterFit.eBestFit))
            {
                strLine = StringHelper.AddCSV(strLine, "header 1", separator);
                strLine = StringHelper.AddCSV(strLine, "header 0", separator);
            }

            useIndented = false;

            for (i = 0; i <= FormattedParameters.Get("lowestLevel").ToInt(); i++)
            {
                if (FormattedParameters.Exists("indented", ReportingConsts.ALLCOLUMNS, i, eParameterFit.eBestFit))
                {
                    useIndented = true;
                }
//.........这里部分代码省略.........
开发者ID:Davincier,项目名称:openpetra,代码行数:101,代码来源:Result.cs


注:本文中的Ict.Petra.Shared.MReporting.TParameterList.ConvertToFormattedStrings方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。