public NewOrderResponse NewOrderOnTableRange(NewOrderRequest Request) { Utils.ToCardLog("AlohaExternal NewOrderOnTableRange "); NewOrderResponse Resp = new NewOrderResponse(); Resp.RequestId = Request.RequestId; Resp.Success = true; if (!UniversalHost.AddRecivedCommand(Resp)) { Resp.Success = false; Resp.ErrorMsg = String.Format("Command allready recived", Request.TableNumber); Resp.IntegrationErrorCode = -1; return(Resp); } AlohaTSClass.OpenTableFromRangeExternal(Request, Resp); UniversalHost.ComplitedRecivedCommand(Resp); return(Resp); }
public bool PrepareCommand(AddEntityRequest Request, CommandResponse Resp) { Utils.ToCardLog("PrepareCommand "); Resp.Success = true; if (!UniversalHost.AddRecivedCommand(Resp)) { Utils.ToCardLog("PrepareCommand Command allready recived"); Resp.Success = false; Resp.ErrorMsg = String.Format("Command allready recived", Request.TableNumber); Resp.IntegrationErrorCode = -1; return(false); } if (Request.AlohaCheckId == 0) { AlohaTableInfoResponse TResp = new AlohaTableInfoResponse(); TResp.TNum = Request.TableNumber; TResp.Success = true; List <Check> Chks = AlohaTSClass.GetChecksOfTableExternal(TResp); Resp.AlohaId = TResp.AlohaId; Resp.AlohaErrorCode = TResp.AlohaErrorCode; Resp.Success = TResp.Success; if (Chks != null) { if (Chks.Count > 0) { Request.AlohaCheckId = Chks[0].AlohaCheckNum; } } } if (Request.AlohaCheckId == 0) { Resp.Success = false; return(false); } return(true); }