Ejemplo n.º 1
0
        public JsonResult AddToGmarketCart(List<BasketInputParamT> reqBasketInputParam)
        {
            CartBiz cartBiz = new CartBiz();
            List<BasketInputParamT> basketInputParamList = new List<BasketInputParamT>();
            GmarketBasketAddResultT gmktBasketInputResult = new GmarketBasketAddResultT();
            gmktBasketInputResult.Result = new GEPBaseResultT();

            string optNos = string.Empty;

            for (int i = 0; i < reqBasketInputParam.Count; i++)
            {
                BasketInputParamT basketInputParam = new BasketInputParamT();
                basketInputParam.CustNo = MemberContext.CustomerNo;
                basketInputParam.LoginID = MemberContext.LoginID;
                basketInputParam.ItemNo = reqBasketInputParam[i].ItemNo;
                basketInputParam.OrderCount = reqBasketInputParam[i].OrderCount;
                optNos = GetOptNo(reqBasketInputParam[i].ItemNo);
                basketInputParam.OptNos = optNos;
                basketInputParam.GEPOrderNo = reqBasketInputParam[i].GEPOrderNo;
                basketInputParam.InputWay = reqBasketInputParam[i].InputWay;

                basketInputParamList.Add(basketInputParam);
            }

            gmktBasketInputResult = cartBiz.BasketInput(basketInputParamList);

            return new JsonResult
            {
                Data = new { Result = gmktBasketInputResult.Result, Data = gmktBasketInputResult.AddResultList }
            };
        }
Ejemplo n.º 2
0
        public void BasketInputTest(BasketInputParamT reqBasketInputParam)
        {
            CartBiz biz = new CartBiz();
            GmarketBasketAddResultT strRetCode = biz.testStart();

            /* 테스트
             * BasketParamT basketParam = MakeBasketParam(reqBasketInputParam);
             *int strRetCode = biz.BasketInput(basketParam);
             */

            //Trace.DumpBusinessEntity(strRetCode);
        }
Ejemplo n.º 3
0
        public void BasketOriginVerificationTest(BasketInputParamT reqBasketInputParam)
        {
            CartBiz biz = new CartBiz();
            ValidCheckResultT originValidCheckResult = new ValidCheckResultT();
            originValidCheckResult.Result = new GEPBaseResultT();
            BasketParamT basket = new BasketParamT();
            basket.Pbid = "1AF6EDB9-DD31-4B64-BEAE-3AF9D28BC89A";
            basket.OrderIdxs = "1100066150|1100066152|1100066159|1100066161";

            originValidCheckResult = biz.OriginVerification(basket);
            Console.WriteLine("주문 Verification 결과 : " + originValidCheckResult.Result.RetCode);
            for (int i = 0, cnt = originValidCheckResult.ValidCheckList.Count; i < cnt; i++)
            {
                Console.WriteLine(originValidCheckResult.ValidCheckList[i].OrderIdx + "::" + originValidCheckResult.ValidCheckList[i].RetCode);
            }
        }
Ejemplo n.º 4
0
        public JsonResult AddToGmarketCart(BasketInputParamT reqBasketInputParam)
        {
            CartBiz cartBiz = new CartBiz();
            GEPOrderBiz gepBiz = new GEPOrderBiz();
            List<BasketInputParamT> basketInputParamList = new List<BasketInputParamT>();
            GmarketBasketAddResultT gmktBasketInputResult = new GmarketBasketAddResultT();
            gmktBasketInputResult.Result = new GEPBaseResultT();

            string optNos = string.Empty;
            long gepOrderNo = 0;

            BasketInputParamT basketInputParam = new BasketInputParamT();
            basketInputParam.CustNo = MemberContext.CustomerNo;
            basketInputParam.LoginID = MemberContext.LoginID;
            basketInputParam.ItemNo = reqBasketInputParam.ItemNo;
            basketInputParam.OrderCount = reqBasketInputParam.OrderCount;
            optNos = GetOptNo(reqBasketInputParam.ItemNo);
            basketInputParam.OptNos = optNos;
            basketInputParam.GEPOrderNo = reqBasketInputParam.GEPOrderNo;
            basketInputParam.InputWay = reqBasketInputParam.InputWay;

            basketInputParamList.Add(basketInputParam);

            gmktBasketInputResult = cartBiz.BasketInput(basketInputParamList);

            if (gmktBasketInputResult.Result.RetCode == 0)
            {
                if(long.TryParse(reqBasketInputParam.GEPOrderNo, out gepOrderNo))
                {
                    gepBiz.AddInCartFromDisableOrder(gepOrderNo);
                }
            }
            return new JsonResult
            {
                Data = new { Result = gmktBasketInputResult.Result, Data = gmktBasketInputResult.AddResultList }
            };
        }
Ejemplo n.º 5
0
        private BasketParamT MakeBasketParam(BasketInputParamT BasketInputParam)
        {
            BasketParamT resBasketParam = new BasketParamT();

            resBasketParam.CustNo = BasketInputParam.CustNo;
            resBasketParam.LoginId = BasketInputParam.LoginID;
            resBasketParam.GoodsCode = BasketInputParam.ItemNo;
            resBasketParam.OrderCnt = BasketInputParam.OrderCount;
            resBasketParam.OptNos = BasketInputParam.OptNos;

            return resBasketParam;
        }
Ejemplo n.º 6
0
        //변수를 모아서 리스트로 만들기
        public List<BasketInputParamT> MakeBasketParamList(string pCustNo, string pLoginID, string pItemNo, string pOrderCount, string pOptNos, string pGEPOrderNo, string pInputWay)
        {
            List<BasketInputParamT> lstBasketInputParam = new List<BasketInputParamT>();
            BasketInputParamT tmpBasketInputParam = new BasketInputParamT();

            lstBasketInputParam.Add(new BasketInputParamT {CustNo = pCustNo, LoginID = pLoginID, ItemNo = pItemNo, OrderCount = pOrderCount, OptNos = pOptNos, GEPOrderNo = pGEPOrderNo, InputWay = pInputWay});

            return lstBasketInputParam;
        }
Ejemplo n.º 7
0
        //변수를 basketParam 형식으로 만들기(리스트)
        public BasketParamT MakeBasketParam(BasketInputParamT reqBasketInputParam)
        {
            BasketParamT resBasketParam = new BasketParamT();

            resBasketParam.CustNo = reqBasketInputParam.CustNo;
            resBasketParam.LoginId = reqBasketInputParam.LoginID;
            resBasketParam.GoodsCode = reqBasketInputParam.ItemNo;
            resBasketParam.OrderCnt = reqBasketInputParam.OrderCount;
            resBasketParam.OptNos = reqBasketInputParam.OptNos;
            resBasketParam.GEPOrderNo = reqBasketInputParam.GEPOrderNo;
            resBasketParam.InputWay = reqBasketInputParam.InputWay;

            return resBasketParam;
        }