예제 #1
0
        public string SaveOrderAndOrderItems(string[] productItemsArray, string userId)
        {
            IDictionary <int, int> itemsDictionary = new Dictionary <int, int>();

            foreach (var cartProductItem in productItemsArray)
            {
                string[] cartProductItemArray = cartProductItem.Split(',');

                if (cartProductItem.Length > 1)
                {
                    itemsDictionary.Add(Convert.ToInt32(cartProductItemArray[0]),
                                        Convert.ToInt32(cartProductItemArray[1]));
                }
            }

            int    usrId = Convert.ToInt32(userId);
            string msg   = _orderGateway.SaveOrderAndOrderItems(itemsDictionary, usrId);

            return(msg);
        }