Пример #1
0
        public ActionResult Index(string id)
        {
            var o = PosDefineBll.GetByProjectNo(id);

            ViewBag.HotelId = UserContext.CurrentUser.HotelId;
            ViewBag.PosId   = o.Id;

            var types = PosCatBll.GetList(UserContext.CurrentUser.HotelId);

            ViewBag.Types = types;

            return(View());
        }
        public ActionResult _SearchContent(long posId, string searchKey, decimal discountValue = 1)
        {
            var pos = PosDefineBll.GetById(posId);

            ViewBag.Pos           = pos;
            ViewBag.HotelId       = UserContext.CurrentUser.HotelId;
            ViewBag.PosId         = posId;
            ViewBag.DiscountValue = discountValue;
            var types = PosCatBll.GetListByPos(posId);

            ViewBag.Types     = types;
            ViewBag.SearchKey = searchKey;
            return(View());
        }
Пример #3
0
        public ActionResult Edit(long posId, long id = 0)
        {
            ViewBag.PosId = posId;
            if (id == 0)
            {
                return(View(new PosCat()
                {
                    PosId = posId
                }));
            }
            var info = PosCatBll.GetById(id);

            if (info.PosId == 0)
            {
                info.PosId = posId;
            }
            return(View(info));
        }
Пример #4
0
        public ActionResult Delete(long id)
        {
            var apiResult = new APIResult();

            try
            {
                PosCatBll.DeleteById(id);
            }
            catch (Exception ex)
            {
                apiResult.Ret = -1;
                apiResult.Msg = ex.Message;
                if (!(ex is OperationExceptionFacade))
                {
                    LogFactory.GetLogger().Log(LogLevel.Error, ex);
                }
            }
            return(Json(apiResult));
        }
Пример #5
0
        public JsonResult Edit(PosCat model)
        {
            var apiResult = new APIResult();

            try
            {
                PosCatBll.AddOrUpdate(model, UserContext.CurrentUser.HotelId);
            }
            catch (Exception ex)
            {
                apiResult.Ret = -1;
                apiResult.Msg = ex.Message;
                if (!(ex is OperationExceptionFacade))
                {
                    LogFactory.GetLogger().Log(LogLevel.Error, ex);
                }
            }

            return(Json(apiResult));
        }
Пример #6
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
            }));
        }
Пример #7
0
        public string GetList(long posId)
        {
            var models = PosCatBll.GetListByPos(posId);

            return(JsonConvert.SerializeObject(models));
        }