コード例 #1
0
        public ActionResult _EditContent(long posId, string isReadonly, string fromType, long id = 0)
        {
            var now = DateTime.Now;

            ViewBag.CurrentTime = now.ToString("yyyy-MM-dd HH:mm:ss");
            ViewBag.HotelId     = UserContext.CurrentUser.HotelId;
            ViewBag.PosId       = posId;

            ViewBag.CurrentOrderNo = PosConsumeBll.GetNewOrderNo(posId);
            var pos = PosDefineBll.GetById(posId);

            ViewBag.Pos = pos;
            if (fromType == "History")
            {
                ViewBag.ReturnPage = "/PosConsume/History?id=" + pos.ProjectNo;
            }
            if (id == 0)
            {
                return(View(new PosConsume()
                {
                    OrderNo = PosConsumeBll.GetNewOrderNo(posId),
                    OpUserName = UserContext.CurrentUser.UserName,
                    PosId = posId
                }));
            }
            var info = PosConsumeBll.GetById(id);

            if (info.PosId == 0)
            {
                info.PosId = posId;
            }
            ViewBag.IsReadonly = isReadonly;
            return(View(info));
        }
コード例 #2
0
        public ActionResult InputBody(long posId, long roomRegId)
        {
            ViewBag.HotelId   = UserContext.CurrentUser.HotelId;
            ViewBag.RoomRegId = roomRegId;
            ViewBag.PosId     = posId;

            ViewBag.HotelId = UserContext.CurrentUser.HotelId;
            var types = PosCatBll.GetListByPos(posId);

            ViewBag.Types          = types;
            ViewBag.Room           = RoomRegBll.GetById(roomRegId);
            ViewBag.CurrentOrderNo = PosConsumeBll.GetNewOrderNo(posId);
            var o = PosConsumeBll.GetById(posId);

            return(View(new PosConsume()
            {
                OrderNo = PosConsumeBll.GetNewOrderNo(posId),
                OpUserName = UserContext.CurrentUser.UserName,
                RoomRegId = roomRegId,
                PosId = posId
            }));
        }