public void TransferTable(int FromEmployeeId, int ToEmployeeId, int TableId, string NewName, int IsGetCheck) { try { EventSenderClass.SendAlohaAsincEvent(PDiscountCard.StopListService.AlohaEventType.TransferTable, "", FromEmployeeId, 0, "", ToEmployeeId, TableId, 0); } catch { } }
public void LogIn(int EmployeeId, string Name) { // AlohaTSClass.ShowMessage("Привет"); try { AlohaTSClass.CurentWaiter = EmployeeId; EventSenderClass.SendAlohaAsincEvent(PDiscountCard.StopListService.AlohaEventType.Login, "", EmployeeId, 0, Name, 0, 0, 0); } catch { } SendToVideo.LogIn(EmployeeId); }
public void CloseCheck(int EmployeeId, int QueueId, int TableId, int CheckId) { if (QueueId == 5) { Utils.ToLog($"CheckId ={CheckId} Чек из очереди №5. Это иp хаба Закрываем без Джестори. В Джестори отправит хаб", 2); return; } if (iniFile.CustomerDisplayEnabled) { RemoteCommands.CustomerDisplayEventSender.AddSendCloseChkToCustDisp(CheckId); } EventSenderClass.SendAlohaAsincEvent(PDiscountCard.StopListService.AlohaEventType.CloseCheck, "", 0, EmployeeId, "", 0, TableId, CheckId); AlohaEventVoids.CloseCheck(EmployeeId, QueueId, TableId, CheckId); SendToVideo.CloseCheck(CheckId); // AlohaTSClass.CloseTable(AlohaTSClass.GetTermNum(), TableId); }
private void RunOper() { try { Utils.ToCardLog("Запуск RunOper OperType=" + OperType.ToString() + " Amount= " + Amount.ToString()); OperInProcess = true; SAPacketObj Request = new SAPacketObj(); SAPacketObj Response = new SAPacketObj(); PCPOSTConnectorObj Conn = new PCPOSTConnectorObj(); Request.Amount = (Amount).ToString(); Request.OperationCode = OperType; Request.CurrencyCode = "643"; Request.DateTimeHost = DateTime.Now.ToString("yyyyMMddHHmmss"); //Conn.InitResources(); Conn.Exchange(ref Request, ref Response, 10); RespCode = Response.ResponseCodeHost.Trim(); Utils.ToCardLog(String.Format("[RunOper] Операция выполнена. Результат: {0}, TrxIDCRM {1}, TrxID {2}, ReferenceNumber {3}", RespCode, Response.TrxIDCRM, Response.TrxID, Response.ReferenceNumber)); try { Utils.ToCardLog(String.Format("[RunOper] Операция выполнена. Входящий запрос: {0}, TrxIDCRM {1}, TrxID {2}, ReferenceNumber {3}", RespCode, Request.TrxIDCRM, Request.TrxID, Request.ReferenceNumber)); } catch { } Receipt = ReadChequeFile(); if (((RespCode == "00") || (RespCode == "000")) && (!Receipt.ToUpper().Contains("НЕ ОПЛАЧИВАТЬ"))) { if ((OperType == 1) || (OperType == 4)) { string Tmp = Receipt; if (!iniFile.Arcus2PrintOneSlip) { Tmp += Convert.ToChar(31) + Environment.NewLine; Tmp += Receipt; Receipt = Tmp; } try { Utils.ToCardLog("[RunOper] Добавляю Слип в Файл."); ArcusSlips AS = Arcus2DataFromXML.ReadArcusSlips(); DateTime HDT = DateTime.Now; try { HDT = Convert.ToDateTime(Response.DateTimeCRM); } catch { } ArcusSlip S = new ArcusSlip() { HostDt = HDT, Sum = Convert.ToDecimal(Response.Amount), Void = (Response.OperationCode == 4), Num = Response.TrxIDCRM, RRN = Response.ReferenceNumber, AlohaCheckId = AlohaCheckId, AlohaCheckShortNum = AlohaCheckShortNum }; string[] Str = Receipt.Split(char.ConvertFromUtf32(10)[0]); foreach (string str in Str) { Utils.ToCardLog(str); S.Slip.Add(str); } decimal SummFromTxt = GetSummFromSlip(S.Slip); if ((SummFromTxt != 0) && (S.Sum != SummFromTxt * 100)) { Utils.ToCardLog("Error Разные суммы в слипе " + SummFromTxt.ToString() + " и ответе от терминала. " + S.Sum.ToString()); S.Sum = SummFromTxt * 100; } AS.Slips.Add(S); Arcus2DataFromXML.WriteArcusSlips(AS); Utils.ToCardLog("[RunOper] Добавлил Слип в Файл."); } catch (Exception e) { Utils.ToCardLog("[Error] Ошибка добавления слипа в файл." + e.Message); } } } else { try { EventSenderClass.SendAlohaAsincEvent(StopListService.AlohaEventType.ErrorCreditCardterminal, "", AlohaTSClass.AlohaCurentState.WaterId, AlohaTSClass.GetJobCode(AlohaTSClass.AlohaCurentState.WaterId), "", Convert.ToInt32(RespCode), (int)AlohaTSClass.AlohaCurentState.TableId, (int)AlohaTSClass.AlohaCurentState.CheckId); } catch { } } resOper = GetCodeDescr(RespCode); if (!Sinc) { RunOperationAsincComplitedVoid(OperType, RespCode, resOper, "", Receipt); } OperInProcess = false; Utils.ToCardLog("Отработал RunOper OperType=" + OperType.ToString() + " Amount= " + Amount.ToString()); } catch (Exception e) { resOper = "Ошибка программы. " + e.Message; RespCode = "-1"; if (!Sinc) { RunOperationAsincComplitedVoid(OperType, RespCode, resOper, "", ""); } Utils.ToCardLog("[Error] Запускa RunOper " + e.Message); } }