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 } }; }
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); }
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); } }
public ActionResult CartDisableOrder() { CartBiz biz = new CartBiz(); GEPBaseResultT result = new GEPBaseResultT(); string gdNos = Request.QueryString["gdNos"]; string gdSelNos = Request.QueryString["gdSelNos"]; string pId = Request.QueryString["pId"]; result = biz.insertCartDisableOrder(gdNos, gdSelNos, pId); return new JsonpResult { Data = new { Result = result, GdNos = gdNos, GdSelNos = gdSelNos }, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; }
public ActionResult BasketTest() { /* OriginCheckResult result = new OriginCheckResult(); result.Result.RetCode = 0; result.Result.RetMessage = "성공"; string orderIdx = Request.QueryString["orderIdx"]; string[] orderIdxList = orderIdx.Split(new char[] { ',' }); foreach (string idx in orderIdxList) { result.CheckResult.Add(new BasketValidCheck { OrderIdx = Convert.ToInt32(idx), RetCode = 0, RetMessage = "성공" }); } */ CartBiz biz = new CartBiz(); ValidCheckResultT result = new ValidCheckResultT(); result.Result = new GEPBaseResultT(); BasketParamT basket = new BasketParamT(); string orderIdx = Request.QueryString["orderIdx"]; string pid = Request.QueryString["pId"]; string cloneIds = Request.QueryString["cloneIds"]; basket.Pbid = pid; basket.OrderIdxs = orderIdx; basket.GoodsCodes = cloneIds; result = biz.OriginVerification(basket); JsonpResult jsonResult = new JsonpResult { Data = new { Result = result.Result, Data = result.ValidCheckList }, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; jsonResult.ContentEncoding = Encoding.GetEncoding("euc-kr"); return jsonResult; }
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 } }; }
// fix : 임시 private string GetOptNo(string itemNo) { OptionNoT optNo = new OptionNoT(); CartBiz cartBiz = new CartBiz(); string tmpOptNo = string.Empty; optNo = cartBiz.GetOptionNo(itemNo); if (optNo != null) { tmpOptNo = optNo.OptNo.ToString(); } else { tmpOptNo = ""; } return tmpOptNo; }
public SelectOptionSetResultT SetSelectOption(List<SelectOptionParamT> lstSelOpt) { CartBiz biz = new CartBiz(); SelectOptionSetResultT result = new SelectOptionSetResultT(); try { foreach (SelectOptionParamT item in lstSelOpt) { result = biz.SetSelectOption(item); if (result.ErrCode != 0) throw new PaymentBizException("필수선택 입력 도중 오류가 발생하였습니다."); } } catch (PaymentBizException e) { Console.WriteLine(e.Message); } return result; }