Example #1
0
        /// <summary>
        /// Sends a message to the queue with a user that have made new orders.
        /// </summary>
        /// <param name="username"></param>
        public void NewOrders(string username)
        {
            List <string> informations = new List <string>
            {
                "Special Calls",
                "Ship Orders",
                username
            };

            rmq_sender.SendMessage(informations);
        }
Example #2
0
        /// <summary>
        /// Sends a message to the queue to create an order detail.
        /// </summary>
        /// <param name="order_detail"></param>
        public void Create(OrderDetail order_detail)
        {
            List <string> informations = new List <string>
            {
                "Order Detail",
                "Create",
                order_detail.OrderId.ToString(),
                order_detail.ProductId.ToString(),
            };

            rmq_sender.SendMessage(informations);
        }
Example #3
0
        /// <summary>
        /// Sends a message to the queue to create a product.
        /// </summary>
        /// <param name="product"></param>
        public void Create(Product product)
        {
            List <string> informations = new List <string>
            {
                "Product",
                "Create",
                product.Name,
                product.Price.ToString(),
            };

            rmq_sender.SendMessage(informations);
        }
Example #4
0
        /// <summary>
        /// Sends a message to the queue to Create a user product.
        /// </summary>
        /// <param name="user_product"></param>
        public void Create(UserProduct user_product)
        {
            List <string> informations = new List <string>
            {
                "User Product",
                "Create",
                user_product.Username,
                user_product.ProductId.ToString(),
                user_product.IsActive.ToString()
            };

            rmq_sender.SendMessage(informations);
        }
Example #5
0
        /// <summary>
        /// Sends a message to the queue to create a user.
        /// </summary>
        /// <param name="user"></param>
        public void Create(CustomUser user)
        {
            List <string> informations = new List <string>
            {
                "User",
                "Create",
                user.Username,
                user.Password,
                user.Email,
                user.Wallet.ToString()
            };

            rmq_sender.SendMessage(informations);
        }
Example #6
0
        /// <summary>
        /// Sends a message to the queue to create an order.
        /// </summary>
        /// <param name="username"></param>
        /// <param name="products"></param>
        public void Create(string username, List <int> products)
        {
            List <string> informations = new List <string>
            {
                "Order Detail",
                "Create",
                username
            };

            foreach (int id in products)
            {
                informations.Add(id.ToString());
            }

            rmq_sender.SendMessage(informations);
        }