Exemple #1
0
        public int addFills(OrderFillStruct ofs) // stored the fills in db and send it to fillpublisher
        {
            OrderDAO ord       = new OrderDAO();
            int      ordStatus = ord.addOrderFills(ofs);

            if (ordStatus == -1)
            {
                Console.WriteLine("error in DB");
                return(-1);
            }
            else if (ordStatus == 0)
            {
                Console.WriteLine("This Order is completed now [Order ID] = " + ofs.OrderNo);
            }
            else
            {
                Console.WriteLine("Order qty diff : " + ordStatus);
            }
            string machineID = "";
            string userID    = "";

            ord.getMachineAndUserFromDB(ofs.OrderNo, ref machineID, ref userID);
            OMFillPub ofp = new OMFillPub();

            if (ofp.zmqUpdate(ofs, machineID, userID) == 0)
            {
                Console.WriteLine("Zmq update success");
            }
            else
            {
                Console.WriteLine("Zmq update fail");
            }
            return(0);
        }
Exemple #2
0
        public int addFills(OrderFillStruct ofs)
        {
            OrderDAO ord       = new OrderDAO();
            int      ordStatus = ord.addOrderFills(ofs);

            if (ordStatus == 0)
            {
                Console.WriteLine("This Order is completed now [Order ID] = " + ofs.OrderNo);
            }
            else
            {
                Console.WriteLine("Order qty diff : " + ordStatus);
            }
            //this will calculate the qty and mark order as complete and all.
            return(0);
        }