Example #1
0
 public KioskLink(RecvData recvdata)
 {
     this.mRecvData = recvdata;
     PathInfo info = PathInfo.CreateInstance();
     string str = this.mRecvData.ResultData.OutCode.Replace("*", "").Trim() + ".xml";
     this.LinkFile = Path.Combine(info.KioskLinkRoot, str);
 }
Example #2
0
 public bool Accumulate_OnReceived(ComParameter recvdata)
 {
     if (base.DisposingFlag)
     {
         base.stbReqStatus.Text = "";
         ULogClass.LogWrite("Logoff Staus = Abolished the messages and ended extraction due to logoff status.");
         return false;
     }
     if (this.acm.IsREQ)
     {
         base.stbReqStatus.Text = "RECEIVING";
     }
     else
     {
         base.stbReqStatus.Text = "RECEIVING";
     }
     if (recvdata.DataString.Length < 400)
     {
         base.stbReqStatus.Text = "";
         return true;
     }
     string str = "";
     RecvData data = new RecvData();
     try
     {
         data = DataFactory.CreateRecvData(recvdata);
     }
     catch
     {
         str = "-1";
     }
     IData mData = null;
     if (data.MData != null)
     {
         mData = data.MData;
         str = base.idv.AppendJobData(mData, 2, true, true, false);
     }
     else
     {
         if (data.ResultData != null)
         {
             base.stbReqStatus.Text = "";
             mData = data.ResultData;
             if (!mData.Header.Control.EndsWith("P"))
             {
                 ULogClass.LogWrite("INET_RECV_OTHER ", mData.GetDataString().Substring(0, 400), true);
                 return true;
             }
             str = base.idv.AppendJobData(mData, 2, true, true, false);
         }
         if (data.OtherData != null)
         {
             mData = data.OtherData;
             str = base.idv.AppendJobData(mData, 2, true, true, false);
         }
     }
     if (str == "-1")
     {
         MessageDialog dialog = new MessageDialog();
         dialog.ShowMessage("E404", "", "");
         dialog.Dispose();
         return false;
     }
     base.ReceiveNoticeMessage(mData);
     if (mData != null)
     {
         ULogClass.LogWrite("INET_RECV_OTHER ", mData.GetDataString().Substring(0, 400), true);
         try
         {
             string path = base.SaveFileCheck(mData);
             if (path != "")
             {
                 if (mData.Header.DataType == "A")
                 {
                     base.idv.AppendRecord(mData, Path.GetDirectoryName(path));
                 }
                 else
                 {
                     DataFactory.SaveToEdiFile(mData, path);
                     base.idv.SaveStatusChange(mData.ID, true);
                 }
             }
         }
         catch
         {
         }
         mData = base.ContainedSet(mData);
         base.pr.Print(this, mData.ID, mData, 2);
     }
     if (mData != null)
     {
         base.idv.Distribute(mData);
     }
     return true;
 }
Example #3
0
 private bool BatchDoc_OnReceived(ComParameter recvdata)
 {
     if (recvdata.DataString.Length >= 400)
     {
         string str = "";
         RecvData data = new RecvData();
         try
         {
             data = DataFactory.CreateRecvData(recvdata);
         }
         catch
         {
             str = "-1";
         }
         IData mData = null;
         if (data.MData != null)
         {
             mData = data.MData;
             str = base.idv.AppendJobData(mData, 2, true, true, false);
         }
         else
         {
             if (data.ResultData != null)
             {
                 mData = data.ResultData;
                 str = base.idv.AppendJobData(mData, 2, true, true, false);
             }
             if (data.OtherData != null)
             {
                 mData = data.OtherData;
                 str = base.idv.AppendJobData(mData, 2, true, true, false);
             }
         }
         if (mData != null)
         {
             ULogClass.LogWrite("INET_RECV_OTHER ", mData.GetDataString().Substring(0, 400), true);
             try
             {
                 string fileName = base.SaveFileCheck(mData);
                 if (fileName != "")
                 {
                     DataFactory.SaveToEdiFile(mData, fileName);
                     base.idv.SaveStatusChange(mData.ID, true);
                 }
             }
             catch
             {
             }
             mData = base.ContainedSet(mData);
             base.pr.Print(this, mData.ID, mData, 2);
         }
         if (mData != null)
         {
             base.idv.Distribute(mData);
         }
         if (str == "-1")
         {
             MessageDialog dialog = new MessageDialog();
             dialog.ShowMessage("E404", "", "");
             dialog.Dispose();
         }
     }
     return true;
 }