Пример #1
0
        public JsonResult InitVirtualDevice(T_DEVICE Param)
        {
            RTN_SAVE_DATA data = Service.deviceService.InitVirtualDevice(Param, SessionHelper.LoginInfo.MEMBER.MEMBER_CODE);

            return(new JsonResult {
                Data = data
            });
        }
Пример #2
0
        public JsonResult AddVirtulaDevice(T_DEVICE Param)
        {
            RTN_SAVE_DATA data = Service.deviceService.AddVirtulaDevice(Param);

            return(new JsonResult {
                Data = data
            });
        }
Пример #3
0
        public JsonResult RelativeDeviceSave(T_DEVICE Param)
        {
            RTN_SAVE_DATA data = Service.deviceService.RelativeDeviceSave(Param);

            return(new JsonResult {
                Data = data
            });
        }
        public ActionResult deviceReg3(long?id)
        {
            this.setDeviceReg(id);
            T_DEVICE data = ViewBag.data;

            return(RedirectToAction("deviceReg_" + (data.AD_FRAME_TYPE ?? 1).ToString() + "Frame", "basic", new
            {
                id = id
            }));

            //return View();
        }
        private void setDeviceReg(long?id, int?adFrameType = 1)
        {
            SessionHelper.LOG_NAME = "로컬박스등록";
            long DEVICE_CODE = (long)(id == null ? -1 : id);

            adFrameType = adFrameType ?? 1;

            T_DEVICE data = Service.deviceService.GetDeviceList(new T_DEVICE_COND {
                DEVICE_CODE = DEVICE_CODE
            }).FirstOrDefault();


            #region >> 초기화
            if (data == null)
            {
                data = new T_DEVICE();
                data.COMPANY_CODE         = SessionHelper.LoginInfo.EMPLOYEE.COMPANY_CODE;
                data.COMPANY_NAME         = SessionHelper.LoginInfo.EMPLOYEE.COMPANY_NAME;
                data.STORE_CODE           = SessionHelper.LoginInfo.EMPLOYEE.STORE_CODE;
                data.STORE_NAME           = SessionHelper.LoginInfo.EMPLOYEE.STORE_NAME;
                data.MOBILE               = SessionHelper.LoginInfo.EMPLOYEE.MOBILE;
                data.MEMBER_CODE          = SessionHelper.LoginInfo.MEMBER.MEMBER_CODE;
                data.MEMBER_NAME          = SessionHelper.LoginInfo.MEMBER.USER_NAME;
                data.CONTACT_COMPANY_CODE = SessionHelper.LoginInfo.EMPLOYEE.COMPANY_CODE;
                data.CONTACT_COMPANY_NAME = SessionHelper.LoginInfo.EMPLOYEE.COMPANY_NAME;
                data.CONTACT_STORE_CODE   = SessionHelper.LoginInfo.EMPLOYEE.STORE_CODE;
                data.CONTACT_STORE_NAME   = SessionHelper.LoginInfo.EMPLOYEE.STORE_NAME;
                data.CONTACT_MOBILE       = SessionHelper.LoginInfo.EMPLOYEE.MOBILE;
                data.CONTACT_CODE         = SessionHelper.LoginInfo.MEMBER.MEMBER_CODE;
                data.CONTACT_NAME         = SessionHelper.LoginInfo.MEMBER.USER_NAME;
                data.AD_FRAME_TYPE        = adFrameType;
            }
            if (SessionHelper.LoginInfo.EMPLOYEE.COMPANY_CODE == 1 || SessionHelper.LoginInfo.EMPLOYEE.COMPANY_CODE == data.COMPANY_CODE || id == null)
            {
                SessionHelper.LoginInfo.EDIT_MODE = enEditMode.WRITE;
            }
            else
            {
                SessionHelper.LoginInfo.EDIT_MODE = enEditMode.READ;
            }

            #endregion >> 초기화
            ViewBag.data        = data;
            ViewBag.KeywordList = new KeywordService().GetAdDeviceSearchKeyword(new CATEGORY_KEYWORD_COND {
                DEVICE_CODE = DEVICE_CODE, KEYWORD_TYPE = 2
            });
        }
        public ActionResult deviceReg(long?id)
        {
            SessionHelper.LOG_NAME = "로컬박스등록";
            long DEVICE_CODE = (long)(id == null ? -1 : id);


            T_DEVICE data = Service.deviceService.GetDeviceList(new T_DEVICE_COND {
                DEVICE_CODE = DEVICE_CODE
            }).FirstOrDefault();

            ViewBag.data = data = data == null ? new T_DEVICE() : data;
            if (SessionHelper.LoginInfo.EMPLOYEE.COMPANY_CODE == 1 || SessionHelper.LoginInfo.EMPLOYEE.COMPANY_CODE == data.COMPANY_CODE || id == null)
            {
                SessionHelper.LoginInfo.EDIT_MODE = enEditMode.WRITE;
            }
            else
            {
                SessionHelper.LoginInfo.EDIT_MODE = enEditMode.READ;
            }

            #region >> 초기화
            if (data.DEVICE_CODE == null || data.DEVICE_CODE <= 0)
            {
                data.COMPANY_CODE         = SessionHelper.LoginInfo.EMPLOYEE.COMPANY_CODE;
                data.COMPANY_NAME         = SessionHelper.LoginInfo.EMPLOYEE.COMPANY_NAME;
                data.STORE_CODE           = SessionHelper.LoginInfo.EMPLOYEE.STORE_CODE;
                data.STORE_NAME           = SessionHelper.LoginInfo.EMPLOYEE.STORE_NAME;
                data.MOBILE               = SessionHelper.LoginInfo.EMPLOYEE.MOBILE;
                data.MEMBER_CODE          = SessionHelper.LoginInfo.MEMBER.MEMBER_CODE;
                data.MEMBER_NAME          = SessionHelper.LoginInfo.MEMBER.USER_NAME;
                data.CONTACT_COMPANY_CODE = SessionHelper.LoginInfo.EMPLOYEE.COMPANY_CODE;
                data.CONTACT_COMPANY_NAME = SessionHelper.LoginInfo.EMPLOYEE.COMPANY_NAME;
                data.CONTACT_STORE_CODE   = SessionHelper.LoginInfo.EMPLOYEE.STORE_CODE;
                data.CONTACT_STORE_NAME   = SessionHelper.LoginInfo.EMPLOYEE.STORE_NAME;
                data.CONTACT_MOBILE       = SessionHelper.LoginInfo.EMPLOYEE.MOBILE;
                data.CONTACT_CODE         = SessionHelper.LoginInfo.MEMBER.MEMBER_CODE;
                data.CONTACT_NAME         = SessionHelper.LoginInfo.MEMBER.USER_NAME;
            }
            #endregion >> 초기화

            ViewBag.KeywordList = new KeywordService().GetAdDeviceSearchKeyword(new CATEGORY_KEYWORD_COND {
                DEVICE_CODE = DEVICE_CODE, KEYWORD_TYPE = 2
            });
            return(View());
        }