Exemple #1
0
        public static bool SendBeerEgaisTo1C(string AlcoCode)
        {
            try
            {
                try
                {
                    Utils.ToCardLog(String.Format("Send beer to EGAIS: {0}", AlcoCode));
                    PDiscountCard.EGAISSrv.wsExtAlco_WebServiceAlco srv = new PDiscountCard.EGAISSrv.wsExtAlco_WebServiceAlco();
                    NetworkCredential Cred = new NetworkCredential("ws", "ws1", "");
                    srv.Credentials = Cred;
                    //   string res = srv.stringPutBottleOpen(QRCode, AlohainiFile.DepNum.ToString());
                    string res2 = srv.stringPutBeerOpen(AlcoCode, DepNum.ToString());
                }
                catch
                {
                }

                Utils.ToCardLog(String.Format("Send beer to EGAIS: {0}", AlcoCode));
                PDiscountCard.EGAISSrv2.wsExtAlco_WebServiceAlco srv2 = new PDiscountCard.EGAISSrv2.wsExtAlco_WebServiceAlco();
                NetworkCredential Cred2 = new NetworkCredential("ws", "ws1", "");
                srv2.Credentials = Cred2;
                //   string res = srv.stringPutBottleOpen(QRCode, AlohainiFile.DepNum.ToString());
                string res = srv2.stringPutBeerOpen(AlcoCode, DepNum.ToString());
                return(res == "0");
            }
            catch (Exception e)
            {
                Utils.ToCardLog(String.Format("Error beer Send to EGAIS: {0}; Err:{1}", AlcoCode, e.Message));
                return(false);
            }
        }
Exemple #2
0
        public static bool SendEgaisTo1C(string QRCode)
        {
            try
            {
                Utils.ToCardLog(String.Format("Send to EGAIS: {0}", QRCode));
                PDiscountCard.EGAISSrv.wsExtAlco_WebServiceAlco srv = new PDiscountCard.EGAISSrv.wsExtAlco_WebServiceAlco();
                NetworkCredential Cred = new NetworkCredential("ws", "ws1", "");
                srv.Credentials = Cred;
                string res = srv.stringPutBottleOpen(QRCode.ToUpper(), DepNum.ToString());
                //  return res == "0";
            }
            catch (Exception e)
            {
                Utils.ToCardLog(String.Format("Error Send to EGAIS: {0}; Err:{1}", QRCode, e.Message));
                //  return false;
            }


            try
            {
                Utils.ToCardLog(String.Format("Send to EGAIS2: {0}", QRCode));
                PDiscountCard.EGAISSrv2.wsExtAlco_WebServiceAlco srv2 = new PDiscountCard.EGAISSrv2.wsExtAlco_WebServiceAlco();
                NetworkCredential Cred = new NetworkCredential("ws", "ws1", "");
                srv2.Credentials = Cred;
                string res = srv2.stringPutBottleOpen(QRCode.ToUpper(), DepNum.ToString());
                Utils.ToCardLog(String.Format("Send to EGAIS2 end res: {0}", res));
                return(res == "0");
            }
            catch (Exception e)
            {
                Utils.ToCardLog(String.Format("Error Send to EGAIS2: {0}; Err:{1}", QRCode, e.Message));
                return(false);
            }

            //http://server1c/alco/ws/wsAlco.1cws?wsdl
            //http://server1c/retail/ws/wsAlco.1cws?wsdl
        }