public JsonResult Step2Save(T_AD Param)
        {
            T_AD dataSel = new AdvertisingService().GetT_AD_List((int)Param.AD_CODE).FirstOrDefault();

            if (dataSel == null)
            {
                dataSel = new T_AD();
            }
            dataSel.TITLE       = Param.TITLE;
            dataSel.SUB_TITLE   = Param.SUB_TITLE;
            dataSel.LOGO_URL    = Param.LOGO_URL;
            dataSel.CONTENT     = Param.CONTENT;
            dataSel.STATUS      = Param.STATUS;
            dataSel.INSERT_CODE = (int)SessionHelper.LoginInfo.MEMBER.MEMBER_CODE;
            dataSel.MEMBER_CODE = (int)SessionHelper.LoginInfo.MEMBER.MEMBER_CODE;
            RTN_SAVE_DATA data = new AdvertisingService().T_AD_Save(dataSel);
            T_COMMON      COMM = new BaseService().GetCommon(new T_COMMON_COND {
                MAIN_CODE = "A001", SUB_CODE = Param.STATUS
            }).FirstOrDefault();

            if (COMM != null)
            {
                data.RETURN_URL = COMM.REF_DATA1.Split('|')[1] + "?id=" + data.DATA;
            }
            SessionHelper.LoginInfo.AD_CODE = Convert.ToInt32(data.DATA);

            return(new JsonResult {
                Data = data
            });
        }
        public JsonResult DevcieAdInfoSave(AdDeviceSaveData saveData)
        {
            RTN_SAVE_DATA rtn = new AdvertisingService().DevcieAdInfoSave(saveData, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = rtn
            });
        }
        public JsonResult PlaceItemUseSave(List <T_MEMBER_PLACE_ITEM> list, long?CODE)
        {
            RTN_SAVE_DATA data = new AdvertisingService().PlaceItemUseSave(list, CODE, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = data
            });
        }
Esempio n. 4
0
        public JsonResult AdRegionAutoSave(CODE_DATA Cond)
        {
            RTN_SAVE_DATA data = new AdvertisingService().AdRegionAutoSave(Cond, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = data
            });
        }
        public JsonResult GetAllPlaceItem(T_MEMBER_PLACE_ITEM_COND param)
        {
            List <T_MEMBER_PLACE_ITEM> data = new AdvertisingService().getAllPlaceItem(param);

            return(new JsonResult {
                Data = data
            });
        }
        public JsonResult InitPlaceItem(T_MEMBER_PLACE_ITEM_COND param)
        {
            RTN_SAVE_DATA data = new AdvertisingService().initPlaceItem(param, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = data
            });
        }
Esempio n. 7
0
        public JsonResult adDelete(long AD_CODE)
        {
            RTN_SAVE_DATA rtn = new AdvertisingService().AdDelete(new long[] { AD_CODE });

            return(new JsonResult {
                Data = rtn
            });
        }
Esempio n. 8
0
        public JsonResult AdRegionSave(List <AD_REGION> list)
        {
            RTN_SAVE_DATA data = new AdvertisingService().AdRegionSave(list, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = data
            });
        }
Esempio n. 9
0
        public JsonResult AdSubSave(List <T_AD_SUB> list)
        {
            RTN_SAVE_DATA data = new AdvertisingService().AdSubSave(list);

            return(new JsonResult {
                Data = data
            });
        }
        public JsonResult AdContentClickSave(LOGGAL_AD_COND Param)
        {
            RTN_SAVE_DATA data = new AdvertisingService().AdContentClickSave(Param);

            return(new JsonResult {
                Data = data
            });
        }
        public JsonResult AdDelete(long[] AD_CODE)
        {
            RTN_SAVE_DATA data = new AdvertisingService().AdDelete(AD_CODE, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = data
            });
        }
        public JsonResult DeviceplaceSave(List <T_DEVICE_PLACE> list, int?DEVICE_CODE = 0)
        {
            RTN_SAVE_DATA data = new AdvertisingService().DevicePlaceSave(list, DEVICE_CODE, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = data
            });
        }
        public JsonResult AdToDeviceShare(List <AD_DEVICE_SHARE> list)
        {
            RTN_SAVE_DATA rtn = new AdvertisingService().AdToDeviceShare(list, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = rtn
            });
        }
        public JsonResult AdDeviceSeqSave(List <LOGGAL_BOX_DATA2> list)
        {
            RTN_SAVE_DATA data = new AdvertisingService().AdDeviceSeqSave(list, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = data
            });
        }
        public JsonResult AdCopy(long AD_CODE)
        {
            RTN_SAVE_DATA rtn = new AdvertisingService().AdCopy(AD_CODE, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = rtn
            });
        }
Esempio n. 16
0
        public JsonResult AdplaceSave(List <T_AD_PLACE> list, int?AD_CODE = 0)
        {
            RTN_SAVE_DATA data = new AdvertisingService().AdplaceSave(list, AD_CODE, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = data
            });
        }
Esempio n. 17
0
        public JsonResult AdOnDeviceSave(AdDeviceSaveData saveData)
        {
            RTN_SAVE_DATA rtn = new AdvertisingService().T_AD_DEVICE_Save(saveData);

            return(new JsonResult {
                Data = rtn
            });
        }
        public JsonResult adDelete(long AD_CODE)
        {
            RTN_SAVE_DATA rtn = new AdvertisingService().AdDelete(new long[] { AD_CODE }, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = rtn
            });
        }
        public JsonResult AdToDeviceShare(List <AD_DEVICE_SHARE> list)
        {
            RTN_SAVE_DATA rtn = new AdvertisingService().AdToDeviceShare(list);

            return(new JsonResult {
                Data = rtn
            });
        }
Esempio n. 20
0
        public JsonResult adSave(T_AD Param, T_DEVICE_MAIN device)
        {
            Param.INSERT_CODE = SessionHelper.LoginInfo.MEMBER.MEMBER_CODE;
            RTN_SAVE_DATA rtn = new AdvertisingService().T_AD_Save(Param, device);

            return(new JsonResult {
                Data = rtn
            });
        }
        public JsonResult AdFavoriteSave(T_AD_FAVORITE Param)
        {
            Param.USER_IP = Request.UserHostAddress;
            RTN_SAVE_DATA data = new AdvertisingService().AdFavoriteSave(Param);

            return(new JsonResult {
                Data = data
            });
        }
Esempio n. 22
0
        public JsonResult AdStatusApprovalSave(T_AD_STATUS Cond)
        {
            Cond.REG_CODE = (int)(SessionHelper.LoginInfo.MEMBER.MEMBER_CODE == null ? 0 : SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);
            RTN_SAVE_DATA data = new AdvertisingService().AdStatusApprovalSave(Cond);

            return(new JsonResult {
                Data = data
            });
        }
        public JsonResult myBannerToDeviceSave(MY_BANNER_SAVE Param)
        {
            Param.REG_CODE = SessionHelper.LoginInfo.MEMBER.MEMBER_CODE;
            RTN_SAVE_DATA data = new AdvertisingService().myBannerToDeviceSave(Param);

            return(new JsonResult {
                Data = data
            });
        }
        public ActionResult Content(long id, long?deviceCode = null, int bannerKind = 2)
        {
            T_AD dataSel = new AdvertisingService().GetT_AD_List(id).FirstOrDefault();
            // Task.Run(() => { new AdvertisingService().AdContentClickSave(new LOGGAL_AD_COND { AD_CODE = id, DEVICE_CODE = deviceCode }); });
            //new AdvertisingService().AdContentClickSave(new LOGGAL_AD_COND { AD_CODE = id, DEVICE_CODE = deviceCode });

            /* T_AD_PLAY_LOG param = new T_AD_PLAY_LOG()
             * {
             *   DEVICE_CODE = deviceCode, AD_CODE = id
             *   , DEVICE_KIND = (deviceCode == null ? 1 : 2)
             *   , FRAME_TYPE = 1
             *   , PLAY_TYPE = 2
             *   , REMARK = ""
             *   , INSERT_CODE = 0
             *
             * };
             * RTN_SAVE_DATA data = new AdvertisingService().AdPlayLogSave(param);*/
            string deviceName = "";

            if (deviceCode != null)
            {
                var device = new LoggalBoxService().GetLoggalBoxList(new LOGGAL_BOX_COND {
                    DEVICE_CODE = deviceCode
                }).FirstOrDefault();
                deviceName = device == null? "" : device.DEVICE_NAME;
            }

            T_AD_PLAY_LOG_MONGO param = new T_AD_PLAY_LOG_MONGO()
            {
                DEVICE_CODE       = deviceCode,
                DEVICE_NAME       = deviceName,
                AD_CODE           = id,
                TITLE             = dataSel.TITLE,
                DEVICE_KIND       = (deviceCode == null ? 1 : 2),
                DEVICE_KIND_NAME  = (deviceCode == null ? "모바일" : "로컬박스"),
                FRAME_TYPE        = 1,
                FRAME_TYPE_NAME   = "1 Frame",
                BANNER_TYPE2      = 1,
                BANNER_TYPE2_NAME = "이미지",
                BANNER_KIND       = bannerKind,
                BANNER_KIND_NAME  = bannerKind == 1 ? "내배너" :"일반배너",
                PLAY_TYPE         = 2,
                PLAY_TYPE_NAME    = "클릭",
                PLAY_TIME         = 30,
                REMARK            = ""
            };

            Task.Run(async() =>
            {
                //new CommonService().GetCommon(new T_COMMON_COND() { ADD_COND = "AND MAIN_CODE IN ('A010','B008','H002','L003','P004')" }).Select(s => new { s.MAIN_CODE, s.SUB_CODE, s.NAME });
                new MongoDBService().AdPlayLogSave(param);
                await Task.FromResult(false);
            });
            ViewBag.data       = dataSel;
            ViewBag.deviceCode = deviceCode;
            return(View());
        }
        public JsonResult Step3Save(STEP3_SAVE Param)
        {
            Param.REG_CODE = (int)SessionHelper.LoginInfo.MEMBER.MEMBER_CODE;
            RTN_SAVE_DATA data = new AdvertisingService().Step3_Save(Param);

            data.RETURN_URL = "/advstep/step4?id=" + Param.AD_CODE.ToString();
            return(new JsonResult {
                Data = data
            });
        }
        public JsonResult GetPlaceItem(T_MEMBER_PLACE_ITEM_COND param)
        {
            List <T_MEMBER_PLACE_ITEM> data = new AdvertisingService().getPlaceItem(param);

            foreach (T_MEMBER_PLACE_ITEM item in data)
            {
                SessionHelper.LoginInfo.EMPLOYEE.MAKER_MAX_COUNT += item.ITEM_PURCHASE_CNT;
            }

            return(new JsonResult {
                Data = data
            });
        }
Esempio n. 27
0
        /// <summary>
        /// 在广告位中显示广告的HtmlHelper方法
        /// </summary>
        /// <param name="htmlHelper"></param>
        /// <param name="positionId">广告位Id</param>
        /// <returns></returns>
        public static MvcHtmlString AdvertisingPosition(this HtmlHelper htmlHelper, string positionId)
        {
            AdvertisingService        advertisingService = new AdvertisingService();
            AdvertisingPosition       position           = advertisingService.GetPosition(positionId);
            IEnumerable <Advertising> advertisings       = new List <Advertising>();

            htmlHelper.ViewData["position"] = position;

            if (position != null && position.IsEnable)
            {
                advertisings = advertisingService.GetAdvertisingsByPositionId(positionId);
            }
            htmlHelper.ViewData["advertisingsInPosition"] = advertisings;

            return(htmlHelper.DisplayForModel("AdvertisingPosition"));
        }
        public void SetpStatus(long?id)
        {
            id = (id == null) ? ((SessionHelper.LoginInfo.AD_CODE == null)? 0 : SessionHelper.LoginInfo.AD_CODE) : id;
            SessionHelper.LoginInfo.AD_CODE = id;
            T_AD data = new AdvertisingService().GetT_AD_List((int)id).FirstOrDefault();

            if (data == null)
            {
                data = new T_AD()
                {
                    AD_CODE = 0, STATUS = 2
                }
            }
            ;
            data.AD_CODE = (int)id;
            ViewBag.data = data;
        }
Esempio n. 29
0
        public JsonResult GetAdData(long?id)
        {
            var data = new AdvertisingService().GetT_AD_List((long)(id == null ? 0 : id)).FirstOrDefault();

            data = data == null ? new T_AD()
            {
                STATUS = 9, HIDE = false
            } : data;

            var keyword = new KeywordService().GetAdDeviceSearchKeyword(new CATEGORY_KEYWORD_COND {
                AD_CODE = Convert.ToInt64(id.ToString("-1")), KEYWORD_TYPE = 2
            });

            return(new JsonResult {
                Data = new { AD_DATA = data, KEYWORD_DATA = keyword }
            });
        }
Esempio n. 30
0
        /// <summary>
        /// 将EditModel转换为广告位实体
        /// </summary>
        /// <returns></returns>
        public AdvertisingPosition AsAdvertisingPosition()
        {
            AdvertisingService  advertisingService = new AdvertisingService();
            AdvertisingPosition position           = advertisingService.GetPosition(PositionId);

            if (position == null)
            {
                position            = AdvertisingPosition.New();
                position.PositionId = PositionId;
            }
            position.Description    = Description ?? string.Empty;
            position.FeaturedImage  = FeaturedImage ?? string.Empty;
            position.PresentAreaKey = PresentAreaKey;
            position.Height         = Height;
            position.Width          = Width;
            position.IsEnable       = IsEnable;
            return(position);
        }