Пример #1
0
        public ActionResult CsQnaView(CsQnaModels model)
        {
            //if (!ModelState.IsValid)
            //return View(model);


            if (model.act_type == "ins")
            {
                //권한 체크===================================================
                if (!chk.chkPermission("CsQna", "PER_INSERT"))
                {
                    return(RedirectToAction("CsQnaView", new { msg = chk.alertStr }));
                }
                //===========================================================
            }

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


            if (!String.IsNullOrEmpty(Session["MANAGE_NO"] as string))
            {
                model.Item.WRITER_ID = (int)Session["MANAGE_NO"];
            }
            string PublicPopupMsg = act.setCsQnaModels(model);

            return(RedirectToAction("CsQnaView", new { seqNo = model.act_key, Msg = PublicPopupMsg }));
        }
Пример #2
0
        public ActionResult CsQnaView(CsQnaModels model)
        {
            if (model.act_type == "ins")
            {
                //권한 체크===================================================
                if (!chk.chkPermission("CsQna", "PER_INSERT"))
                {
                    return(RedirectToAction("CsQna", new { msg = chk.alertStr }));
                }
                //===========================================================
            }

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

            if (model.act_type == "view")
            {
                //권한 체크===================================================
                if (!chk.chkPermission("CsQna", "PER_UPDATE"))
                {
                    return(RedirectToAction("CsQna", new { msg = chk.alertStr }));
                }
                //===========================================================
            }
            model.Item.QNA_TYPE = int.Parse(model.schType);

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

            model.Item.ESE_CODE  = (string)Session["ESE_CODE"];
            model.Item.WRITER_ID = (int)Session["MANAGE_NO"];

            string PublicPopupMsg = act.setCsQnaModels(model);

            return(RedirectToAction("CsQnaView", new { seqNo = model.act_key, Msg = PublicPopupMsg }));
        }