private void PreLoadFTData()
        {
            var hotelId = UserContext.CurrentUser.HotelId;

            if (!_ft_isLoaded)
            {
                _ft_isLoaded           = true;
                _ft_rooms              = RoomBll.GetListBy(hotelId);
                _ft_roomregs           = RoomRegBll.GetListByHotelId(hotelId);
                _ft_members            = MemberBll.GetList(hotelId);
                _ft_membersType        = MemberTypeBll.GetList(hotelId);
                _ft_RoomRegGuestInfoCN = RoomRegGuestInfoCNBll.GetListByHotelId(hotelId);
                _ft_RoomRegGuestInfoEN = RoomRegGuestInfoENBll.GetListByHotelId(hotelId);
                _ft_MaterialLease      = MaterialLeaseBll.GetListByHotel(hotelId);
                _ft_RoomType           = RoomTypeBll.GetListByHotelId(hotelId);
                _ft_RoomYdRecord       = RoomYdRecordBll.GetListByHotel(hotelId);
                _ft_GlobalFeeSet       = GlobalFeeSetBll.GetByHotelId(hotelId);
                _ft_MaintainRoom       = MaintainRoomBll.GetListByHotelId(hotelId);
                _ft_RoomSelfuse        = RoomSelfBll.GetListByHotelId(hotelId);
                _ft_RoomYD             = RoomYdBll.GetListByHotel(hotelId);
                _ft_RoomSet            = RoomSetBll.GetBy(hotelId);
                if (_ft_RoomSet == null)
                {
                    _ft_RoomSet = RoomSetBll.GetBy(0);
                }
            }
        }
Esempio n. 2
0
        public ActionResult Delete(long id, string type)
        {
            var apiResult = new APIResult();

            try
            {
                if (type == "cn")
                {
                    RoomRegGuestInfoCNBll.DeleteById(id);
                }
                else
                {
                    RoomRegGuestInfoENBll.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));
        }
Esempio n. 3
0
 public string GetList(long roomRegId, string type)
 {
     if (type == "cn")
     {
         var datas = RoomRegGuestInfoCNBll.GetList(roomRegId);
         return(JsonConvert.SerializeObject(datas));
     }
     else
     {
         var datas = RoomRegGuestInfoENBll.GetList(roomRegId);
         return(JsonConvert.SerializeObject(datas));
     }
 }
Esempio n. 4
0
        public JsonResult EditENYd(RoomRegGuestInfoEN model)
        {
            var apiResult = new APIResult();
            int code      = 0;

            try
            {
                RoomRegGuestInfoENBll.AddOrUpdateYd(model, UserContext.CurrentUser.HotelId, ref code);
            }
            catch (Exception ex)
            {
                apiResult.Ret = -1;
                apiResult.Msg = ex.Message;
                if (!(ex is OperationExceptionFacade))
                {
                    LogFactory.GetLogger().Log(LogLevel.Error, ex);
                }
            }
            if (code == -100)
            {
                apiResult.Ret = code;
            }
            return(Json(apiResult));
        }