예제 #1
0
        public JsonResult Tssx(long id, string xh, string tx, string sh, string zw, string sw, string ts, string qt, string type)
        {
            var apiResult = new APIResult();

            try
            {
                if (type == "cn")
                {
                    GuestInfoCNBll.Tssx(id, xh, tx, sh, zw, sw, ts, qt);
                }
                else
                {
                    GuestInfoENBll.Tssx(id, xh, tx, sh, zw, sw, ts, qt);
                }
            }
            catch (Exception ex)
            {
                apiResult.Ret = -1;
                apiResult.Msg = ex.Message;
                if (!(ex is OperationExceptionFacade))
                {
                    LogFactory.GetLogger().Log(LogLevel.Error, ex);
                }
            }
            return(Json(apiResult));
        }
예제 #2
0
 public string Search(int page, int rows, string key, string value, string type)
 {
     //搜索产讯是从历史客人中查询数据,方便录入数据,而GuestInfoCN存的就是历史客人数据,
     //RoomRegGuestInfoCN存的是当前登记但的客人数据,所以完全没毛病
     if (type == "cn")
     {
         var pager = GuestInfoCNBll.GetPager(page, rows, UserContext.CurrentUser.HotelId, key, value);
         return(JsonConvert.SerializeObject(pager));
     }
     else
     {
         var pager = GuestInfoENBll.GetPager(page, rows, UserContext.CurrentUser.HotelId, key, value);
         return(JsonConvert.SerializeObject(pager));
     }
 }
예제 #3
0
 /// <summary>
 /// 设置拉黑/白名单
 /// </summary>
 /// <param name="id"></param>
 /// <param name="reason"></param>
 /// <param name="isdisable"></param>
 /// <param name="GuestType"></param>
 /// <returns></returns>
 public string SetUserType(long id, string reason, string GuestType = nameof(GuestInfoCN))
 {
     if (GuestType == nameof(GuestInfoCN))
     {
         GuestInfoCNBll.SetDisable(new GuestInfoCN()
         {
             Id = id, DisableReason = reason
         });
     }
     else
     {
         GuestInfoENBll.SetDisable(new GuestInfoEN()
         {
             Id = id, DisableReason = reason
         });
     }
     return(JsonConvert.SerializeObject("设置成功"));
 }