public AlohaTableInfoResponse GetTableInfo(int TableNumber) { Utils.ToCardLog("AlohaExternal GetTableInfo " + TableNumber); AlohaTableInfoResponse TInfo = new AlohaTableInfoResponse(); TInfo.TNum = TableNumber; TInfo.Success = true; List <Check> Chks = AlohaTSClass.GetChecksOfTableExternal(TInfo); if (Chks != null) { foreach (Check Chk in Chks) { TInfo.Checks.Add(GetAlohaCheckInfo(Chk)); } } return(TInfo); }
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); }