Пример #1
0
        private bool IsHotelAdmin(int id)
        {
            BLL.wx_hotel_admin   dBll       = new BLL.wx_hotel_admin();
            Model.wx_hotel_admin hotelAdmin = dBll.GetModel(id);

            //酒店管理员
            if (hotelAdmin != null)
            {
                return(true);
            }

            BLL.wx_hotel_user   suBll     = new BLL.wx_hotel_user();
            Model.wx_hotel_user hotelUser = suBll.GetModel(id);

            if (hotelUser != null)
            {
                return(true);
            }

            return(false);
        }
Пример #2
0
        public int GetHotelId()
        {
            if (IsAdminLogin())
            {
                Model.manager        admin         = GetAdminInfo();
                BLL.wx_hotel_admin   hotelAdminBll = new BLL.wx_hotel_admin();
                Model.wx_hotel_admin hotelAdmin    = hotelAdminBll.GetModel(admin.id);
                if (hotelAdmin != null)
                {
                    return(hotelAdmin.HotelId);
                }

                BLL.wx_hotel_user   suBll     = new BLL.wx_hotel_user();
                Model.wx_hotel_user hotelUser = suBll.GetModel(admin.id);

                if (hotelUser != null)
                {
                    return(hotelUser.HotelId);
                }

                return(0);
            }
            return(0);
        }