Exemplo n.º 1
0
        public AlohaCheckInfoResponse GetCheckInfo(int CheckId)
        {
            Utils.ToCardLog("AlohaExternal GetCheckInfo " + CheckId);
            AlohaCheckInfoResponse ChInfo = new AlohaCheckInfoResponse();

            ChInfo.CheckId = CheckId;
            ChInfo.Success = true;

            ChInfo.Check = GetAlohaCheckInfo(AlohaTSClass.GetCheckByIdExternal(ChInfo));
            return(ChInfo);
        }
Exemplo n.º 2
0
        public CommandResponse PrintOrder(string orderId)
        {
            var resp = new CommandResponse()
            {
                Success = true
            };

            try
            {
                Utils.ToCardLog("PrintOrderLabel orderId: " + orderId);
                //MainClass.MainThread.
                // Thread.CurrentThread.SetApartmentState(ApartmentState.STA);


                int ordid  = Convert.ToInt32(orderId);
                var respon = new AlohaCheckInfoResponse()
                {
                    CheckId = ordid
                }
                ;
                var chk = AlohaTSClass.GetCheckByIdExternal(respon);
                if (respon.Success)
                {
                    string err = "";
                    bool   res = PDiscountCard.PrintOrder.PrintOrder.Instanse.PrintToGoOrderLabels(chk, out err);
                    if (!res)
                    {
                        resp.Success  = false;
                        resp.ErrorMsg = err;
                    }
                }
                else
                {
                    resp = respon;
                }
            }
            catch (Exception e)
            {
                resp.Success  = false;
                resp.ErrorMsg = e.Message;
                Utils.ToCardLog("Error PrintOrderLabel " + e.Message);
            }
            return(resp);
        }