本文整理汇总了C#中DocumentFormat.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# DocumentFormat.ToString方法的具体用法?C# DocumentFormat.ToString怎么用?C# DocumentFormat.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DocumentFormat
的用法示例。
在下文中一共展示了DocumentFormat.ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendToFaxGateway
private void SendToFaxGateway(string AFaxTelexInd, string AFaxTelexNumbers, string AConfirmLabel,
byte[] AContractBody, DocumentFormat ADocFormat, string ARecipient, Int32 ATradeId, string ATradeSysTicket, Int32 ARqmtId, Int32 AConfirmId,
bool ARtf, string AFromAddress, string ASubject, string AEmailBody, bool ACoverPage)
{
try
{
if (AFaxTelexNumbers != null)
{
string[] AFaxTelexNumbersList = AFaxTelexNumbers.Split(';');
foreach (string AFaxTelexNumber in AFaxTelexNumbersList)
{
if (AContractBody == null)
{
XtraMessageBox.Show("Confirm Data was not found. Send/Resend was cancelled.",
"Confirm Not Found", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (!InboundSettings.IsProductionSystem)
{
var destination = new TransmitDestination(AFaxTelexNumber);
if (!destination.IsValidNonProdSendToAddress())
{
XtraMessageBox.Show("Please enter a valid Non-Production EMail Address or Fax Number.", "Non-Production Address Verification",
MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
}
this.Cursor = Cursors.WaitCursor;
string faxTelexNumber = AFaxTelexNumber;
//5/21/09 Israel -- Create a new folder for each fax transmission.
string folderName = ATradeId.ToString() + "_" + String.Format("{0:yyMMddHHmmss}", DateTime.Now);
//string faxDir = tempFaxDir + folderName;
string faxDir = Path.Combine(tempFaxDir, folderName);
System.IO.Directory.CreateDirectory(faxDir);
faxDir += "\\";
string xmlFileNameOnly = "request.xml";
string xmlFileNameWithPath = faxDir + xmlFileNameOnly;
string rtfFileNameOnly = "Contract.rtf";
string rtfFileNameWithPath = faxDir + rtfFileNameOnly;
string pdfDocFileNameOnly = "Contract.pdf";
string pdfDocFileNameWithPath = faxDir + pdfDocFileNameOnly;
//Israel 9/3/2015 -- Replace PDFMetamorphosis with DevExpress RichEditControl
//SaveRtfAsPdfDoc(rtfFileNameWithPath, pdfDocFileNameWithPath);
WSUtils.SaveByteArrayAsPdfFile(AContractBody, ADocFormat, pdfDocFileNameWithPath);
//1/28/2015 Israel - Replaced DB name with system setting
//if (barStaticDBName.Caption.ToLower() != PROD_DB_NAME)
//Israel 10/26/15 Removed TestFaxNumber
//if (!Properties.Settings.Default.IsProductionSystem)
// faxTelexNumber = Properties.Settings.Default.TestFaxNumber;
//PDF isn't handling E. European languages properly so send them as rtf.
string docFileName = pdfDocFileNameOnly;
string bookingCoSn = GetTradeSummaryData(ATradeId, "BookingCoSn");
string cdtyCode = GetTradeSummaryData(ATradeId, "CdtyCode");
// bool isFreightDeal = (cdtyCode == "FRGHT");
string cptySn = GetTradeSummaryData(ATradeId, "CptySn");
//5/20/09 Israel - Handle RTF override parm
if (ARtf)
docFileName = rtfFileNameOnly;
string docFileNameWithPath = faxDir + docFileName;
TransmitDestinationType transDestType;
if (AFaxTelexNumber.Contains("@"))
transDestType = TransmitDestinationType.EMAIL;
else
transDestType = TransmitDestinationType.FAX;
IXmitRequestDal xmitRequestDal = new XmitRequestDal(sqlConnectionStr);
int xmitRequestId = xmitRequestDal.SaveTradeRqmtConfirmXmitRequest(AConfirmId, transDestType, AFaxTelexNumber, Utils.GetUserNameWithoutDomain(p_UserId));
string xmlText = GetFaxSubmitXML(ATradeId.ToString(),ATradeSysTicket, docFileName, AFaxTelexInd,
AFaxTelexNumber, ARecipient, ARqmtId.ToString(), AConfirmId.ToString(), AConfirmLabel,
ASubject, AEmailBody, ACoverPage, xmitRequestId.ToString());
System.IO.File.WriteAllText(xmlFileNameWithPath, xmlText);
string emailToAddress = Properties.Settings.Default.TransmissionGatewayEmailToAddress;
//string emailToAddress = "[email protected]";
//Israel 9/28/2015
//string emailFromAddress = toolbarOrWindowsUserId + "@" + Properties.Settings.Default.EMailDomain;
//Israel 10/26/15 -- Removed FaxGatewayEmailFromAddress
string emailFromAddress = ""; //Properties.Settings.Default.FaxGatewayEmailFromAddress;
if (AFromAddress.Length > 2)
emailFromAddress = AFromAddress;
else
emailFromAddress = emailToAddress;
//.........这里部分代码省略.........