FastReport delphi转换成.net的常用转换

Delphi代码

C# .net代码

备注说明

TfrxMemoView(Sender)

((TextObject)sender)(控件名字也可以)

当前控件

TfrxMemoView(Sender).Visible

((TextObject)sender).Visible

设置当前控件的可见性

<pShowDueDate>='Y'

((string)Report.GetParameterValue("pShowDueDate"))=="Y";

Vs传递的参数

<frxdsCM_INVM."PAY_DATE">

(string)Report.GetColumnValue("frxdsCM_INVM.PAY_DATE")

数据库表中字段

DateToStr(GetDate(<frxdsCM_INVM."PAY_DATE">))               

DateTime.ParseExact(((string)Report.GetColumnValue("frxdsCM_INVM.PAY_DATE")), "yyyyMMdd", System.Globalization.CultureInfo.CurrentCulture).ToString("yyyy/MM/dd");

DateToStr是时间转换的方法,。Net中并未封装,直接转换的

FormatFloat(C_NUM_FMT,dAmount*(-1))

(dAmount*-1).ToString(C_NUM_FMT)

格式化数字

原文地址:https://www.cnblogs.com/guangfangxiaokeai/p/12529572.html