Ejemplo n.º 1
0
    protected void btnExcel_Click(object sender, System.EventArgs e)
    {
        DataTable incometPayoutConInfo = formBLL.GetIncometPayoutConInfo(this.prjId, this.txtContractCode.Text.Trim(), this.txtContractName.Text.Trim(), this.txtConType.Text.Trim(), 0, 0);

        if (incometPayoutConInfo.Rows.Count > 0)
        {
            DataRow dataRow = incometPayoutConInfo.NewRow();
            dataRow["Num"]                  = "合计";
            dataRow["ContractPrice"]        = incometPayoutConInfo.Compute("sum(ContractPrice)", "1>0");
            dataRow["InCometContractMoney"] = incometPayoutConInfo.Compute("sum(InCometContractMoney)", "1>0");
            dataRow["IncometBalanceMoney"]  = incometPayoutConInfo.Compute("sum(IncometBalanceMoney)", "1>0");
            dataRow["IncometPaymentMoney"]  = incometPayoutConInfo.Compute("sum(IncometPaymentMoney)", "1>0");
            dataRow["IncometApplyMoney"]    = incometPayoutConInfo.Compute("sum(IncometApplyMoney)", "1>0");
            dataRow["PayoutModifiedMoney"]  = incometPayoutConInfo.Compute("sum(PayoutModifiedMoney)", "1>0");
            dataRow["PayoutBalanceMoney"]   = incometPayoutConInfo.Compute("sum(PayoutBalanceMoney)", "1>0");
            dataRow["PayoutPaymentMoney"]   = incometPayoutConInfo.Compute("sum(PayoutPaymentMoney)", "1>0");
            dataRow["SpreadConMoney"]       = incometPayoutConInfo.Compute("sum(SpreadConMoney)", "1>0");
            dataRow["SpreadBalanceMoney"]   = incometPayoutConInfo.Compute("sum(SpreadBalanceMoney)", "1>0");
            dataRow["SpreadPaymentMoney"]   = incometPayoutConInfo.Compute("sum(SpreadPaymentMoney)", "1>0");
            incometPayoutConInfo.Rows.Add(dataRow);
        }
        IExportable exporter   = new ExcelExporter();
        FileExport  fileExport = new FileExport(exporter, this.FormatData(incometPayoutConInfo), "收入合同明细.xls");

        fileExport.Export(base.Request.Browser.Browser);
    }
Ejemplo n.º 2
0
        static void Export(List <Info> infoList)
        {
            if (infoList == default(List <Info>))
            {
                throw new ArgumentNullException("The infoList connot be null.");
            }

            var path = string.Format(
                "{0}{1}_{2}.csv",
                Constants.PathWrite,
                Constants.FileNameExport,
                DateTime.Now.ToString("yyyyMMddHHmmssfff")
                );

            string.Concat(Constants.PathWrite, Constants.FileNameExport);
            var file1 = new FileExport(Enumerators.ExporType.Csv);

            file1.Export(infoList, path);

            path = string.Format(
                "{0}{1}_{2}.txt",
                Constants.PathWrite,
                Constants.FileNameExport,
                DateTime.Now.ToString("yyyyMMddHHmmssfff")
                );

            var file2 = new FileExport(Enumerators.ExporType.Text);

            file2.Export(infoList, path);
        }
Ejemplo n.º 3
0
    protected void btnExcel_Click(object sender, EventArgs e)
    {
        DataTable   dateSouce  = this.getDateSouce();
        IExportable exporter   = new ExcelExporter();
        FileExport  fileExport = new FileExport(exporter, dateSouce, "周计划报表.xls");

        fileExport.Export(base.Request.Browser.Browser);
    }
Ejemplo n.º 4
0
    protected void btnExcel_Click(object sender, System.EventArgs e)
    {
        DataTable   data       = this.GetData();
        IExportable exporter   = new ExcelExporter();
        FileExport  fileExport = new FileExport(exporter, data, "项目成本分析报表.xls");

        fileExport.Export(base.Request.Browser.Browser);
    }
Ejemplo n.º 5
0
        public void ExportFilm(string filename)
        {
            var fileNameWithPath = Path.Join(SimProp.SimulationPath, filename);

            _loggingViewModel.LogInfo($"Exporting particle film:{Environment.NewLine}{fileNameWithPath}");

            _export.Export(
                ParticleFilm,
                fileNameWithPath, FileFormat.LammpsDump, false);

            _loggingViewModel.LogInfo("done.");
        }
Ejemplo n.º 6
0
    protected void btnExcel_Click(object sender, EventArgs e)
    {
        DataTable   reportData = this.GetReportData();
        IExportable exportable = new ExcelExporter();
        FileExport  fileExport = new FileExport(exportable, reportData, "支出合同发票台帐.xls");

        exportable.PercentColumns = new int[]
        {
            10
        };
        fileExport.Export(base.Request.Browser.Browser);
    }
Ejemplo n.º 7
0
    protected void btnExcel_Click(object sender, System.EventArgs e)
    {
        DataTable  reportData = this.GetReportData();
        FileExport fileExport = new FileExport(new ExcelExporter
        {
            PercentColumns = new int[]
            {
                11
            }
        }, reportData, ContractManage_ContractReport_ContractSumReport.CorpName + "明细表.xls");

        fileExport.Export(base.Request.Browser.Browser);
    }
Ejemplo n.º 8
0
    protected void btnExcel_Click(object sender, System.EventArgs e)
    {
        DataTable  reportData = this.GetReportData();
        FileExport fileExport = new FileExport(new ExcelExporter
        {
            PercentColumns = new int[]
            {
                8
            }
        }, reportData, "支出合同结算报表.xls");

        fileExport.Export(base.Request.Browser.Browser);
    }
Ejemplo n.º 9
0
    protected void btnExcel_Click(object sender, EventArgs e)
    {
        DataTable  reportData = this.GetReportData();
        FileExport fileExport = new FileExport(new ExcelExporter
        {
            PercentColumns = new int[]
            {
                5
            }
        }, reportData, this.labTitle.Text.ToString() + ".xls");

        fileExport.Export(base.Request.Browser.Browser);
    }
Ejemplo n.º 10
0
    protected void btnExcel_Click(object sender, System.EventArgs e)
    {
        DataTable   reportData = this.GetReportData();
        IExportable exportable = new ExcelExporter();

        exportable.PercentColumns = new int[]
        {
            8
        };
        string     fileName   = this.GetPrjName() + "的" + BudgetManage_Report_IndirectCostDetail.cBSName + "明细表.xls";
        FileExport fileExport = new FileExport(exportable, reportData, fileName);

        fileExport.Export(base.Request.Browser.Browser);
    }