コード例 #1
0
        /// <summary>
        /// 模版房间列表
        /// </summary>
        /// <returns></returns>
        public string GetModelList(string roomtype, string order, string userroomid)
        {
            BLL.ModelRoom bll = new BLL.ModelRoom();


            return(bll.GetModelRoomS2(roomtype, order, userroomid));
        }
コード例 #2
0
ファイル: UserRoom.cs プロジェクト: 552847957/mjapi
        /// <summary>
        /// 单个模版房间详情
        /// </summary>
        /// <param name="did"></param>
        /// <returns></returns>
        public string GetModelDetail(string did)
        {
            StringBuilder sb = new StringBuilder();
            string        s  = Commen.DataCache.GetCache(did).ToSafeString();

            // string s = "";
            if (!s.IsEmpty())
            {
                return(s.Replace("m&sup2;", "㎡").Replace("平米", "㎡").Replace("dm", "顶面").Replace("ld", "地面").Replace("qm", "墙面").Replace("a顶面in", "admin"));;
            }
            else
            {
                #region 详细查询
                sb.Append("{");
                string room = new BLL.ModelRoom().GetModelRoomSExt(did);
                sb.Append("\"modleroom\":");
                sb.Append(room);
                sb.Append(",");
                sb.Append("\"jiancai\":");
                string zcstr = new BLL.ZC().GetZcMx(did);
                sb.Append(zcstr);
                sb.Append(",");
                sb.Append("\"gongyi\":");
                string gystr = new GY().GetGyMx(did);
                sb.Append(gystr);
                sb.Append("}");
                #endregion


                Commen.DataCache.SetCache(did, sb, DateTime.Now.AddMonths(1), TimeSpan.Zero);

                //    cache.Insert("DD", "滑动过期测试", null, System.Web.Caching.Cache.NoAbsoluteExpiration, TimeSpan.FromSeconds(10));

                return(sb.ToSafeString().Replace("m&sup2;", "㎡").Replace("平米", "㎡").Replace("dm", "顶面").Replace("ld", "地面").Replace("qm", "墙面").Replace("a顶面in", "admin"));
            }
        }