Пример #1
0
        public static void SendOrderToAloha(int OrderId, List <OrderToAloha.Item> Items, int CompanyId, string CompanyName, string BortName, int DiscountId, int Margin, DateTime TimeOfShipping, int FreeDisc, out int AlohaCheckId, out int AlohaTableNum)
        {
            //Сверсекретный код взаимодействия с алохой
            if (FreeDisc == null)
            {
                FreeDisc = 0;
            }
            AlohaCheckId  = 0;
            AlohaTableNum = 0;

            var Items2 = Items;

            //AlohaTS.AddOrder(OrderId, Items, CompanyId, CompanyName, BortName, DiscountId, Margin, TimeOfShipping, FreeDisc,out AlohaCheckId, out AlohaTableNum);
            Utils.ToLog("ToSql.AddOrder" + OrderId);
            ToSql.AddOrder(OrderId, Items2, CompanyId, CompanyName, BortName, DiscountId, Margin, TimeOfShipping, FreeDisc, AlohaCheckId, AlohaTableNum);
        }
Пример #2
0
        public static void Init(int port, string SqlServerName)
        {
            try
            {
                Utils.ToLog("AlohaGalerySrvInit port " + port + "SqlServerName " + SqlServerName);
                ToSql.SetConnStr(SqlServerName);

                ThreadAddOders = new System.Threading.Thread(SendFromNetToAloha.AddOrdQ);
                ThreadAddOders.Start();
                RL = new RemoteLisenter();
                RL.Init(port);
            }
            catch (Exception e)
            {
                Utils.ToLog("Error AlohaGalerySrvInit port " + port + "SqlServerName " + SqlServerName + "  " + e.Message);
            }
        }