예제 #1
0
        //보관 신청==========================================================================================
        // GET: Stoc 보관 신청
        public ActionResult StocReq(StocReqModels model, string msg)
        {
            //권한 체크===================================================
            if (!chk.chkPermission("StocReq", "PER_SELECT"))
            {
                return(RedirectToAction("Index", "Home", new { msg = chk.alertStr }));
            }
            //===========================================================

            model = act.StocReqSetBase(model);

            if (model.act_key != 0)
            {
                model.act_type = "updt";
                model          = act.GetStocReqView(model);
            }
            else
            {
                model.act_type   = "ins";
                model.Item.SEQNO = 0;
            }

            if (model.act_type == "excel")
            {
                model.Excel           = act.UploadExcelProd(model.Excel);
                TempData["PublicMsg"] = "등록 완료";
                model.act_type        = "list";
                return(View(model));
            }


            return(View(model));
        }
예제 #2
0
        public ActionResult StocReqListView(string seqNo, string msg)
        {
            //권한 체크===================================================
            if (!chk.chkPermission("StocReqList", "PER_SELECT"))
            {
                return(RedirectToAction("Index", "Home", new { msg = chk.alertStr }));
            }
            //===========================================================

            StocReqModels model = new StocReqModels();

            model = act.StocReqSetBase(model);

            int pSeqNo = 0;

            model.act_type = "view";
            model.act_key  = pSeqNo;
            if (int.TryParse(seqNo, out pSeqNo))
            {
                model.act_type = "updt";
                model.act_key  = pSeqNo;
                model          = act.GetStocReqView(model);
            }

            return(View(model));
        }
예제 #3
0
        //보관 신청 현황 조회====================================================================================

        // GET: Stoc 보관 신청 현황 조회
        public ActionResult StocReqList()
        {
            //권한 체크===================================================
            if (!chk.chkPermission("StocReqList", "PER_SELECT"))
            {
                return(RedirectToAction("Index", "Home", new { msg = chk.alertStr }));
            }
            //===========================================================

            StocReqModels model = new StocReqModels();

            model = act.StocReqSetBase(model);

            //페이징 설정 초기화
            model.Paging.page    = 1;
            model.Paging.pageNum = 10;
            model.sortKey        = "SEQNO";

            //리스트 가져오기
            model = act.GetStocReqList(model);

            model.arrayStation = new List <schTypeArray>();

            ViewData["pageing"] = comM.setPaging(model.Paging);             //페이징 HTML 만들기

            return(View(model));
        }
예제 #4
0
 public JsonResult StocReqChkBarcode(StocReqModels model)
 {
     model.AjaxEseCode = (string)Session["ESE_CODE"];
     model.AjaxEstCode = (string)Session["EST_CODE"];
     model             = act.StocReqChkBarcode(model);
     return(Json(model.InItem));
 }
예제 #5
0
        public ActionResult StocReqList(StocReqModels model)
        {
            //권한 체크===================================================
            if (!chk.chkPermission("StocReqList", "PER_SELECT"))
            {
                return(RedirectToAction("Index", "Home", new { msg = chk.alertStr }));
            }
            //===========================================================

            //삭제일 경우
            if (model.act_type == "del")
            {
                //권한 체크===================================================
                if (!chk.chkPermission("StocReqList", "PER_DELETE"))
                {
                    return(RedirectToAction("StocReqList", new { msg = chk.alertStr }));
                }
                //===========================================================

                TempData["PublicMsg"] = act.delStocReqList(model.act_key);                 //삭제
                model.act_type        = "list";
                model.act_key         = 0;
            }

            // 선택 삭제일 경우
            if (model.act_type == "delChk")
            {
                //권한 체크===================================================
                if (!chk.chkPermission("StocReqList", "PER_DELETE"))
                {
                    return(RedirectToAction("StocReqList", new { msg = chk.alertStr }));
                }
                //===========================================================

                TempData["PublicMsg"] = act.delStocReqList(model.delChk);                 //삭제
                model.act_type        = "list";
                model.act_key         = 0;
            }

            model = act.StocReqSetBase(model);
            model = act.GetStocReqList(model);                  //리스트 가져오기

            ViewData["pageing"] = comM.setPaging(model.Paging); //페이징 HTML 만들기

            return(View(model));
        }
예제 #6
0
        public ActionResult StocReq(StocReqModels model)
        {
            //권한 체크===================================================
            if (!chk.chkPermission("StocReq", "PER_SELECT"))
            {
                return(RedirectToAction("Index", "Home", new { msg = chk.alertStr }));
            }
            //===========================================================

            StringSplitOptions option = new StringSplitOptions();

            string[] divideGoods = new string[1];
            divideGoods[0] = "^||^";

            string[] divideAttr = new string[1];
            divideAttr[0] = "^|^";

            string[] tmpGoods = model.goodsLst.Split(divideGoods, option);

            foreach (var tmpItem in tmpGoods)
            {
                if (tmpItem != "")
                {
                    string[] tmpData = tmpItem.Split(divideAttr, option);

                    StcInReqGoods tmpGood = new StcInReqGoods();
                    tmpGood.BARCODE = tmpData[0];
                    tmpGood.BOXNUM  = tmpData[1];
                    tmpGood.CNT     = int.Parse(tmpData[2]);
                    model.Items.Add(tmpGood);
                }
            }

            string PublicPopupMsg = act.SetStocReq(model);

            if (model.act_type == "ins")
            {
                return(RedirectToAction("StocReqList", new { msg = PublicPopupMsg }));
            }

            model = act.StocReqSetBase(model);
            model = act.GetStocReqView(model);
            TempData["PublicMsg"] = PublicPopupMsg;
            return(View(model));
        }
예제 #7
0
        public ActionResult StocReqListView(StocReqModels model)
        {
            if (model.act_type == "updt")
            {
                //권한 체크===================================================
                if (!chk.chkPermission("StocReqList", "PER_UPDATE"))
                {
                    return(RedirectToAction("StocReqListView", new { msg = chk.alertStr }));
                }
                //===========================================================

                ViewBag.PublicPopupMsg = act.chkStocReq(model.act_key);
            }

            model = act.StocReqSetBase(model);
            model = act.GetStocReqView(model);
            return(View(model));
        }