コード例 #1
0
        public ActionResult SaveExist(Exist exist, string W_name, string U_name)
        {
            //通过key查询到要改变的exit
            //通过W_name和U_name分别获得仓库编号和用户编号
            //整合信息
            UserBusinessLayer userBusinessLayer = new UserBusinessLayer();

            if ((exist.U_id = userBusinessLayer.GetId(U_name)) == -1)
            {
                return(RedirectToAction("RedirectStorage"));
            }
            WarehouseBusinessLayer warehouseBusinessLayer = new WarehouseBusinessLayer();

            if ((exist.W_id = warehouseBusinessLayer.GetId(W_name)) == -1)
            {
                return(RedirectToAction("RedirectStorage"));
            }
            //修改信息
            ExistBusinessLayer existBusinessLayer = new ExistBusinessLayer();

            existBusinessLayer.InputExist(exist.IO_Id, exist);

            //重定向
            return(RedirectToAction("RedirectStorage"));
        }
コード例 #2
0
        public ActionResult LossExist(string Count, string Co_Id, string IO_Id)
        {
            //MyStorageBusinessLayer storageBusinessLayer = new MyStorageBusinessLayer();
            //减去要报损的数据
            //通过IO_Id和Co_Id查询到符合条件的Exist
            ExistBusinessLayer existBusinessLayer = new ExistBusinessLayer();

            if (Convert.ToInt32(Count) > 0)
            {
                existBusinessLayer.InputExist(IO_Id, Co_Id, Convert.ToInt32(Count));
            }

            return(RedirectToAction("RedirectStorage"));
        }