Delphi转c#
请末位才兄帮我把一段Delphi代码翻译成c#代码,谢谢functionTfrmQRepPrint.SendToActiveFax(isMltFax:boolean):B...
请末位才兄帮我把一段Delphi代码翻译成c#代码,谢谢
function TfrmQRepPrint.SendToActiveFax(isMltFax:boolean):Boolean; //xlj 20080710
var tempActiveFax:TextFile;
SysDir:array[0..256] of char;
filenameStr:string;
begin
result:=False;
filenameStr:=trim(cdsPrint.fieldbyname('bill_type').asstring)+
'@F201 '+trim(cdsPrint.fieldbyname('receiver').asstring)+
'@@F211 '+trim(cdsPrint.fieldbyname('codeaddr').asstring)+'@';
FrmQrepRepV.quickrep1.ReportTitle:=filenameStr;
if isMltFax then
PreviwPrintMultJPGFax
else
if isMltImg then
PreviwPrintMult(True)
else
begin
if FrmQrepRepV.PageHeaderHaveContinueLabel then //20081103 xlj
begin
FrmQrepRepV.QuickRep1.Prepare;
FrmQrepRepV.iPageCount:=FrmQrepRepV.QuickRep1.QRPrinter.PageCount;
end;
FrmQrepRepV.QuickRep1.Print;
end;
result:=True;
end; 展开
function TfrmQRepPrint.SendToActiveFax(isMltFax:boolean):Boolean; //xlj 20080710
var tempActiveFax:TextFile;
SysDir:array[0..256] of char;
filenameStr:string;
begin
result:=False;
filenameStr:=trim(cdsPrint.fieldbyname('bill_type').asstring)+
'@F201 '+trim(cdsPrint.fieldbyname('receiver').asstring)+
'@@F211 '+trim(cdsPrint.fieldbyname('codeaddr').asstring)+'@';
FrmQrepRepV.quickrep1.ReportTitle:=filenameStr;
if isMltFax then
PreviwPrintMultJPGFax
else
if isMltImg then
PreviwPrintMult(True)
else
begin
if FrmQrepRepV.PageHeaderHaveContinueLabel then //20081103 xlj
begin
FrmQrepRepV.QuickRep1.Prepare;
FrmQrepRepV.iPageCount:=FrmQrepRepV.QuickRep1.QRPrinter.PageCount;
end;
FrmQrepRepV.QuickRep1.Print;
end;
result:=True;
end; 展开
1个回答
展开全部
没办完整译的,LZ
quickreport控件在.net中是没有的
因为很多东西都没有,所以无法正常通过编译
大概如下:
Boolean SendToActiveFax(Boolean isMltFax)
{
Boolean result=false;
Char[] SysDir = new Char[256];
String filenameStr = String.Empty;
filenameStr = cdsPrint.fieldbyname("bill_type").ToString().Trim()
+ "@F201"
+ cdsPrint.fieldbyname("receiver").ToString().Trim()
+ "@@F211"
+ cdsPrint.fieldbyname("codeaddr").ToString().Trim();
FrmQrepRepV.quickrep1.ReportTitle = filenameStr;
if (isMltFax)
{
PreviwPrintMultJPGFax;//不知道是什么方法
}
else
{
if (isMltImg)
{
PreviwPrintMult(true);
}
else
{
if (FrmQrepRepV.PageHeaderHaveContinueLabel==true) //20081103 xlj
{
FrmQrepRepV.QuickRep1.Prepare;
FrmQrepRepV.iPageCount=FrmQrepRepV.QuickRep1.QRPrinter.PageCount;
}
FrmQrepRepV.QuickRep1.Print;
result=true;
}
}
return result;
}
quickreport控件在.net中是没有的
因为很多东西都没有,所以无法正常通过编译
大概如下:
Boolean SendToActiveFax(Boolean isMltFax)
{
Boolean result=false;
Char[] SysDir = new Char[256];
String filenameStr = String.Empty;
filenameStr = cdsPrint.fieldbyname("bill_type").ToString().Trim()
+ "@F201"
+ cdsPrint.fieldbyname("receiver").ToString().Trim()
+ "@@F211"
+ cdsPrint.fieldbyname("codeaddr").ToString().Trim();
FrmQrepRepV.quickrep1.ReportTitle = filenameStr;
if (isMltFax)
{
PreviwPrintMultJPGFax;//不知道是什么方法
}
else
{
if (isMltImg)
{
PreviwPrintMult(true);
}
else
{
if (FrmQrepRepV.PageHeaderHaveContinueLabel==true) //20081103 xlj
{
FrmQrepRepV.QuickRep1.Prepare;
FrmQrepRepV.iPageCount=FrmQrepRepV.QuickRep1.QRPrinter.PageCount;
}
FrmQrepRepV.QuickRep1.Print;
result=true;
}
}
return result;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询