Esempio n. 1
0
        public ActionResult CsNoticeView(CsNoticeModels model)
        {
            if (model.act_type == "ins")
            {
                //권한 체크===================================================
                if (!chk.chkPermission("CsNotice", "PER_INSERT"))
                {
                    return(RedirectToAction("CsNoticeView", new { msg = chk.alertStr }));
                }
                //===========================================================
            }

            if (model.act_type == "updt")
            {
                //권한 체크===================================================
                if (!chk.chkPermission("CsNotice", "PER_UPDATE"))
                {
                    return(RedirectToAction("CsNoticeView", new { msg = chk.alertStr }));
                }
                //===========================================================
            }



            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            if (model.RadioBoxPop == true)
            {
                model.Item.POPUP_DISPLAY = 1;
            }
            else
            {
                model.Item.POPUP_DISPLAY = 0;
            }

            model.RadioBoxPop = false;
            if (model.Item.POPUP_DISPLAY == 1)
            {
                model.RadioBoxPop = true;
            }



            if (!String.IsNullOrEmpty(Session["MANAGE_NO"] as string))
            {
                model.Item.WRITER_ID = (int)Session["MANAGE_NO"];
            }
            //권한 관련과 같이 갈 것들 이걸 적용시키면 Radio 버튼이 안된다.추후 같이 갈 수 있는 방식을 찾아야 한다.
            //string PublicPopupMsg = act.setCsNotice(model);
            //return RedirectToAction("CsNoticeView", new { seqNo = model.act_key, Msg = PublicPopupMsg });

            ViewBag.PublicPopupMsg = act.setCsNotice(model);

            return(View(model));
        }
Esempio n. 2
0
        public ActionResult CsNoticeView(CsNoticeModels model)
        {
            if (model.act_type == "ins")
            {
                //권한 체크===================================================
                if (!chk.chkPermission("CsNotice", "PER_INSERT"))
                {
                    return(RedirectToAction("CsNoticeView", new { msg = chk.alertStr }));
                }
                //===========================================================
            }

            if (model.act_type == "updt")
            {
                //권한 체크===================================================
                if (!chk.chkPermission("CsNotice", "PER_UPDATE"))
                {
                    return(RedirectToAction("CsNoticeView", new { msg = chk.alertStr }));
                }
                //===========================================================
            }


            // 유효성 검사
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            // 라디오 버튼
            if (model.RadioBoxPop == true)
            {
                model.Item.POPUP_DISPLAY = 1;
            }
            else
            {
                model.Item.POPUP_DISPLAY = 0;
            }

            model.RadioBoxPop = false;
            if (model.Item.POPUP_DISPLAY == 1)
            {
                model.RadioBoxPop = true;
            }



            ViewBag.PublicPopupMsg = act.setCsNotice(model);

            return(View(model));
        }