本文整理汇总了C#中IData.GetDataString方法的典型用法代码示例。如果您正苦于以下问题:C# IData.GetDataString方法的具体用法?C# IData.GetDataString怎么用?C# IData.GetDataString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IData
的用法示例。
在下文中一共展示了IData.GetDataString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetExportData
private string GetExportData(IData data)
{
StringBuilder builder = new StringBuilder();
builder.AppendLine(data.TimeStamp.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo));
builder.AppendLine(((int) data.Status).ToString());
builder.AppendLine(data.UserFolder);
builder.AppendLine(this.FlagCheck(data.IsRead).ToString());
builder.AppendLine(this.FlagCheck(data.IsPrinted).ToString());
builder.AppendLine(this.FlagCheck(data.IsSaved).ToString());
builder.AppendLine(this.FlagCheck(data.IsDeleted).ToString());
builder.AppendLine(data.SignFileFolder).ToString();
builder.Append(data.GetDataString());
return builder.ToString();
}
示例2: OnSend
private void OnSend(object sender, IData Data)
{
if (base.ComStatus == 1)
{
this.sendjobsender = sender;
if (Data.Signflg == 1)
{
if (this.CA == null)
{
this.CA = new SignaturesCert();
}
try
{
IntPtr handle;
if (sender == null)
{
handle = base.Handle;
}
else
{
handle = ((Form) sender).Handle;
}
this.CA.GetSigneture(handle);
}
catch (Exception exception)
{
new MessageDialog().ShowMessage("E124", MessageDialog.CreateExceptionMessage(exception));
base.StatusChange(1);
base.Enabled = true;
this.SendRecvDlgHide();
return;
}
}
this.SendRecvDlgShow(1);
if (this.bSendFlag)
{
base.frmSendRecv.lblSendJobCode.Text = Data.JobCode + " " + this.SendCount.ToString() + "/" + this.SendAllCount.ToString();
}
else
{
base.frmSendRecv.lblSendJobCode.Text = Data.JobCode;
}
base.Enabled = false;
ComParameter senddata = new ComParameter();
Data = base.SendDataCreate(Data, 0);
senddata.DataString = Data.GetDataString();
senddata.AttachFolder = Data.AttachFolder;
if (Data.Signflg == 1)
{
senddata.SelectSign = this.CA.Cert;
senddata.Sign = Data.Signflg.ToString();
}
base.StatusChange(2);
string iD = Data.ID;
if (!this.bSendFlag)
{
if (Data.ID == null)
{
iD = base.idv.AppendJobData(Data, 0, false, false, false);
}
else
{
iD = base.idv.UpdateJobData(Data);
}
}
else
{
iD = base.idv.UpdateJobData(Data);
}
if (base.sysenv.TerminalInfo.Debug)
{
ULogClass.LogWrite("INET_SEND ", Data.GetDataString(), false);
}
else
{
ULogClass.LogWrite("INET_SEND ", Data.GetDataString().Substring(0, 400), true);
}
this.ConnectFlag = true;
int errcode = this.ihc.Send(this, iD, senddata);
if (errcode > 0)
{
HttpErrorDlg dlg = new HttpErrorDlg();
base.StatusChange(1);
base.Enabled = true;
this.SendRecvDlgHide();
dlg.ShowSendError(errcode);
ULogClass.LogWrite("SendError Status=" + System.Enum.GetNames(typeof(HttpResult))[errcode].ToString());
dlg.Dispose();
}
else if (errcode < 0)
{
base.StatusChange(1);
base.Enabled = true;
this.SendRecvDlgHide();
ULogClass.LogWrite("User Cancel StatusCode = " + errcode.ToString());
if (this.bSendFlag)
{
if (base.BatchSendFlag)
{
base.BatchSendFlag = false;
//.........这里部分代码省略.........
示例3: SaveToEdiFile
public static void SaveToEdiFile(IData data, string fileName)
{
using (FileStream stream = new FileStream(fileName, FileMode.Create, FileAccess.Write))
{
using (StreamWriter writer = new StreamWriter(stream, FileEncoding))
{
writer.Write(data.GetDataString());
}
stream.Close();
}
}