Пример #1
0
        public JsonResult SeteBayPaypalAccount(string payPalAccountValue, string eBayAccountValue)
        {
            bool checkeBayAccount = false;

            //if (ViewBag.memberContext == null || string.IsNullOrEmpty(ViewBag.memberContext.LoginID) = true)
            //{
            //    return Json(new { result = "eBay계정이 존재하지 않습니다." }, JsonRequestBehavior.AllowGet);
            //}

            TaInfo taInfo = new BizDac.TaInfoBiz().FindTaUser(ViewBag.memberContext.LoginID);
            if (taInfo == null)
            {
                return Json(new { result = "eBay계정이 존재하지 않습니다." }, JsonRequestBehavior.AllowGet);
            }
            foreach (var rec in taInfo.accounts)
            {
                if (rec.site_login_id == eBayAccountValue)
                {
                    checkeBayAccount = true;
                }
            }
            if (checkeBayAccount == false)
            {
                return Json(new { result = "eBay계정이 존재하지 않습니다." }, JsonRequestBehavior.AllowGet);
            }

            new BizDac.TaInfoBiz().TaAccountUpdatePaypal(ViewBag.memberContext.LoginID, "ebay", eBayAccountValue, payPalAccountValue);

            var jsonData = new
            {
                result = "true"
            };
            return Json(jsonData, JsonRequestBehavior.AllowGet);
        }
Пример #2
0
        public ActionResult eBayAccountList()
        {
            ViewBag.FrontUrls = this.FrontUrls;
            ViewBag.LoginID = ViewBag.memberContext.LoginID;

            TaInfo taInfo = new BizDac.TaInfoBiz().FindTaUser(ViewBag.memberContext.LoginID);

            return View(taInfo);
        }
Пример #3
0
        /// <summary>
        /// eBay에 리스팅후 결과를 반환한다.
        /// </summary>
        /// <param name="data">eBay 리스팅 대기상품</param>
        /// <returns></returns>
        private ResultSet SetListItem(eBayItemsData data)
        {
            ResultSet result = new ResultSet();
            try
            {
                TaInfo taInfo = new BizDac.TaInfoBiz().FindTaUser(data.ta);
                var queryTainfo = (from t in taInfo.accounts
                                   where ((int)t.site_id) == data.site
                                   select t).ToList();

                //사이트 정보가 없으면 에러
                if (queryTainfo.Count() == 0)
                {
                    result.isResult = false;
                    result.Message = "사이트 정보가 없습니다";
                    return result;
                }

                ListItemRequest req = new ListItemRequest();

                //등록과 재등록을 구분해 준다.
                if (String.IsNullOrEmpty(data.itemno))
                {
                    logger.Info("forSeller listing id : " + data._id);

                    req = new ListItemRequest
                        {
                            EbayItemInfo = CreateJsonData(data)
                            ,
                            EbayTokenID = queryTainfo[0].token
                            ,
                            InventoryID = data._id.ToString()
                            ,
                            SiteID = data.site
                            ,
                            ItemID = ""
                        };
                }
                else
                {
                    logger.Info("forSeller relisting id : " + data._id);

                    req = new ListItemRequest
                    {
                        EbayItemInfo = CreateJsonData(data)
                        ,
                        EbayTokenID = queryTainfo[0].token
                        ,
                        InventoryID = data._id.ToString()
                        ,
                        SiteID = data.site

                        ,ItemID = data.itemno.ToString()
                    };
                }

                var res = new ItemService(apiUrl).ListItem
            (req);

                result.eBayResponse = res.Response;
                if (res.Ack == AckType.Failure)
                {
                    result.isResult = false;
                    result.Message = "eBay 리스팅에 실패했습니다.";
                }
                else
                {
                    result.isResult = true;
                }
            }
            catch (Exception ex)
            {
                result.Message = ex.Message.ToString();
            }

            return result;
        }
Пример #4
0
        public JsonResult SetUserInfo(string gmktId, string engName, string engAddress, string firstTel1, string firstTel2, string firstTel3, string firstTel4, string secondTel1, string secondTel2, string secondTel3, string secondTel4)
        {
            GepAdminResult Result = new BizDac.TaInfoBiz().TaUpsert(gmktId, engName, engAddress, firstTel1, firstTel2, firstTel3, firstTel4, secondTel1, secondTel2, secondTel3, secondTel4);

            return Json(Result, JsonRequestBehavior.AllowGet);
        }