Exemple #1
0
        private void ShowInfo(int _id)
        {
            Model.wx_fc_floor    model  = bll.GetModel(_id);
            Model.wx_requestRule rModel = rBll.GetModelList("modelFunctionName='微房产' and modelFunctionId=" + _id)[0];
            this.txtAddress.Text       = model.Address;
            this.txtfSummary.InnerText = model.fSummary;
            this.txtjtpt.InnerText     = model.jtpt;
            this.txtLngYPoint.Text     = model.latY.ToString();
            this.txtLatXPoint.Text     = model.lngX.ToString();

            this.txtNewsTitle.Text     = model.newsTitle;
            this.txtpSummary.InnerText = model.pSummary;
            this.txtSort_id.Text       = model.sort_id.ToString();
            this.txtVideo.Text         = model.videoUrl;
            this.txtKW.Text            = rModel.reqKeywords;
            this.slideA.ImageUrl       = model.slideA;
            this.slideAUrl.Text        = model.slideA;
            this.slideC.ImageUrl       = model.slideC;
            this.slideCUrl.Text        = model.slideC;
            this.slideD.ImageUrl       = model.slideD;
            this.slideDUrl.Text        = model.slideD;
            this.slideE.ImageUrl       = model.slideE;
            this.slideEUrl.Text        = model.slideE;
            this.slideB.ImageUrl       = model.sildeB;
            this.slideBUrl.Text        = model.sildeB;
            this.txtNewsCover.Text     = model.newsCover;
            this.imgNewsCover.ImageUrl = model.newsCover;
            this.txtHtheadImg.Text     = model.htheadImg;
            this.imgHtheadImg.ImageUrl = model.htheadImg;
            this.txtFheadImg.Text      = model.fheadImg;
            this.imgFheadImg.ImageUrl  = model.fheadImg;
            this.ddlQjt.SelectedValue  = model.qid.ToString();
            this.ddlYybm.SelectedValue = model.yid.ToString();
        }
Exemple #2
0
        /// <summary>
        /// 微房产
        /// </summary>
        /// <param name="id"></param>
        /// <param name="apiid"></param>
        /// <param name="openid"></param>
        /// <returns></returns>
        private IList <Model.ResponseContentEntity> WXFReponse(int id, int apiid, string openid)
        {
            IList <Model.ResponseContentEntity> responselist = new List <Model.ResponseContentEntity>();

            Model.ResponseContentEntity responseEntity = new Model.ResponseContentEntity();
            responseEntity.id  = id;
            responseEntity.wid = apiid;

            BLL.wx_fc_floor   fcBll    = new BLL.wx_fc_floor();
            Model.wx_fc_floor actModel = fcBll.GetModel(id);
            if (actModel == null)
            {
                responseEntity.rcType   = Model.ReponseContentType.text;
                responseEntity.rContent = "该房产信息不存在";
            }

            else
            {
                responseEntity.rcType   = Model.ReponseContentType.txtpic;
                responseEntity.rContent = actModel.newsTitle;
                // responseEntity.rContent2 = actModel.pSummary;
                responseEntity.rContent2 = "";
                responseEntity.detailUrl = MyCommFun.getWebSite() + "/weixin/wfangchan/index.aspx?wid=" + apiid + "&fid=" + id;
                responseEntity.picUrl    = actModel.newsCover;
            }
            responselist.Add(responseEntity);

            return(responselist);
        }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     gid = MXRequest.GetQueryInt("gid");
     fid = MXRequest.GetQueryInt("fid");
     if (!IsPostBack)
     {
         BLL.wx_fc_aboutWe awBll = new BLL.wx_fc_aboutWe();
         BLL.wx_fc_floor   fBll  = new BLL.wx_fc_floor();
         if (gid > 0)
         {
             Model.wx_fc_aboutWe awModel = awBll.GetModel(gid);
             address = awModel.address;
             name    = awModel.name;
             logourl = awModel.logoAddress;
             tel     = awModel.telephone;
             x       = awModel.latY;
             y       = awModel.lngX;
         }
         if (fid > 0)
         {
             Model.wx_fc_floor fModel = fBll.GetModel(fid);
             address = fModel.Address;
             name    = fModel.newsTitle;
             logourl = fModel.newsCover;
             y       = fModel.latY;
             x       = fModel.lngX;
         }
     }
 }
Exemple #4
0
        void showInfo()
        {
            BLL.wx_fc_yyInfo   yBll  = new BLL.wx_fc_yyInfo();
            BLL.wx_fc_floor    fBll  = new BLL.wx_fc_floor();
            BLL.wx_fc_yySysset ysBll = new BLL.wx_fc_yySysset();
            int yid = MyCommFun.Obj2Int(fBll.GetModel(fid).yid);

            photo = ysBll.GetModel(yid).headImg;
            this.rptDinfo.DataSource = yBll.GetList(string.Format(" openid='{0}' and wid={1} and fid={2}", openid, wid, fid));
            this.rptDinfo.DataBind();
        }
Exemple #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     fid    = MXRequest.GetQueryInt("fid");
     wid    = MXRequest.GetQueryInt("wid");
     openid = MyCommFun.RequestOpenid();
     if (!IsPostBack)
     {
         BLL.wx_fc_houseType htBll = new BLL.wx_fc_houseType();
         BLL.wx_fc_floor     fBll  = new BLL.wx_fc_floor();
         fModel = fBll.GetModel(fid);
         this.rptHt.DataSource = htBll.GetList(string.Format(" wid={0} and fid={1} ", wid, fid));
         jlNum = htBll.GetList(string.Format(" wid={0} and fid={1} ", wid, fid)).Tables[0].Rows.Count;
         this.rptHt.DataBind();
     }
 }
Exemple #6
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/json";
            string action = MXRequest.GetQueryString("myact");
            int    wid    = MyCommFun.RequestInt("wid");
            string openid = MyCommFun.RequestOpenid();

            #region 添加印象
            if (action == "fyyx")
            {
                BLL.wx_fc_fyImpression      fBll     = new BLL.wx_fc_fyImpression();
                Dictionary <string, string> jsondict = new Dictionary <string, string>();
                string imp_user = MyCommFun.QueryString("imp_user");
                int    fid      = MyCommFun.RequestInt("fid");
                int    record   = fBll.GetRecordCount(" content='" + imp_user + "'");
                int    allrw    = fBll.GetRecordCount(" id>0 ");
                int    rep      = fBll.GetRecordCount(" openid='" + openid + "'");
                if (rep > 0)
                {
                    jsondict.Add("errno", "2");
                    jsondict.Add("res", "你已经添加过印象了");
                    context.Response.Write(MyCommFun.getJsonStr(jsondict));
                    return;
                }

                if (record > 0)//有过此类印象
                {
                    double re = (Convert.ToDouble(record) / allrw) * 100;
                    jsondict.Add("res", re.ToString() + "%");
                }
                else           //独特印象
                {
                    jsondict.Add("res", "1");
                }
                Model.wx_fc_fyImpression fModel = new Model.wx_fc_fyImpression();
                fModel.content    = imp_user;
                fModel.createDate = DateTime.Now;
                fModel.fid        = fid;
                fModel.openid     = openid;
                fModel.sort_id    = 1;
                fModel.wid        = wid;
                fModel.quantity   = 1;
                fBll.Add(fModel);
                jsondict.Add("errno", "1");
                context.Response.Write(MyCommFun.getJsonStr(jsondict));
                return;
            }
            #endregion

            #region 添加预约订单信息
            if (action == "addyydd")
            {
                Dictionary <string, string> jsondict = new Dictionary <string, string>();
                BLL.wx_fc_yyInfo            yBll     = new BLL.wx_fc_yyInfo();
                BLL.wx_fc_floor             fBll     = new BLL.wx_fc_floor();
                string             linkman           = MyCommFun.QueryString("truename");
                string             dateline          = MyCommFun.QueryString("dateline");
                string             timepart          = MyCommFun.QueryString("timepart");
                int                housetype         = MyCommFun.RequestInt("housetype");
                string             info      = MyCommFun.QueryString("info");
                string             tel       = MyCommFun.QueryString("tel");
                int                fid       = MyCommFun.RequestInt("fid");
                int                addOrEdit = MyCommFun.RequestInt("addOrEdit");
                int                yid       = MyCommFun.Obj2Int(fBll.GetModel(fid).yid);
                Model.wx_fc_yyInfo yyinfo    = new Model.wx_fc_yyInfo()
                {
                    createdate  = DateTime.Now,
                    hid         = housetype,
                    telephone   = tel,
                    remark      = info,
                    name        = linkman,
                    yydate      = MyCommFun.Obj2DateTime(dateline),
                    yydatepart  = timepart,
                    wid         = wid,
                    fid         = fid,
                    yid         = yid,
                    openid      = openid,
                    orderStatus = "待回复",
                    sort_id     = 99
                };
                if (addOrEdit > 0)
                { //修改
                    yyinfo.Id = addOrEdit;
                    yBll.Update(yyinfo);
                }
                else                  //添加
                {
                    yBll.Add(yyinfo);
                }
                jsondict.Add("errno", "0");
                jsondict.Add("content", "");
                context.Response.Write(MyCommFun.getJsonStr(jsondict));
                return;
            }
            #endregion

            #region 加载相册信息
            if (action == "xiangce")
            {
                BLL.wx_fc_album      bll   = new BLL.wx_fc_album();
                BLL.wx_albums_photo  pBll  = new BLL.wx_albums_photo();
                BLL.wx_albums_info   aBll  = new BLL.wx_albums_info();
                Model.wx_albums_info model = new Model.wx_albums_info();
                int           fid          = MyCommFun.RequestInt("fid");
                StringBuilder sb           = new StringBuilder("");
                sb.Append("showPics([");
                //获得楼盘相册
                DataTable artlist = bll.GetList(" fid=" + fid).Tables[0];

                int a_rowsNum = 0;                                                        //每行显示的图片数量
                List <Model.wx_albums_photo> allist = new List <Model.wx_albums_photo>(); //图片表
                if (artlist != null && artlist.Rows.Count > 0)
                {
                    DataRow dr;
                    for (int i = 0; i < artlist.Rows.Count; i++)//循环楼盘相册
                    {
                        dr    = artlist.Rows[i];
                        model = aBll.GetModel(int.Parse(dr["aid"].ToString()));//根据楼盘相册得到该相册基本信息表

                        //if (model.albums == null || model.albums.Count <= 0)
                        //{
                        //    continue;
                        //}
                        allist = pBll.GetModelList(" aId=" + model.id);
                        sb.Append("{\"title\":\"" + model.aName + "\",");
                        a_rowsNum = (allist.Count) / 2;
                        //第一行
                        sb.Append(" \"ps1\":[");
                        sb.Append(" { \"type\":\"title\", \"title\":\"" + model.aName + "\", \"subTitle\":\"" + model.aContent + "\"}");
                        if (a_rowsNum > 0)
                        {
                            sb.Append(",");
                        }
                        for (int h = 0; h < a_rowsNum; h++)
                        {
                            if (h < (a_rowsNum - 1))
                            {
                                sb.Append(" {\"type\":\"img\",\"name\":\"" + allist[h].pContent + "\",\"img\":\"" + MyCommFun.getWebSite() + allist[h].photoPic + "\",\"size\":[480,450]},");
                            }
                            else
                            {
                                sb.Append(" {\"type\":\"img\",\"name\":\"" + allist[h].pContent + "\",\"img\":\"" + MyCommFun.getWebSite() + allist[h].photoPic + "\",\"size\":[480,450]}");
                            }
                        }
                        sb.Append("],");

                        //第二行
                        sb.Append(" \"ps2\":[");
                        int h_cishu = 0;
                        for (int h = a_rowsNum; h < allist.Count; h++)
                        {
                            if (h_cishu == 1)
                            {
                                sb.Append(" {\"type\":\"text\",\"content\":\"" + model.aContent + "\"},");
                            }

                            if (h < (allist.Count - 1))
                            {
                                sb.Append(" {\"type\":\"img\",\"name\":\"" + allist[h].pContent + "\",\"img\":\"" + MyCommFun.getWebSite() + allist[h].photoPic + "\",\"size\":[480,450]},");
                                h_cishu++;
                            }
                            else
                            {
                                sb.Append(" {\"type\":\"img\",\"name\":\"" + allist[h].pContent + "\",\"img\":\"" + MyCommFun.getWebSite() + allist[h].photoPic + "\",\"size\":[480,450]}");
                            }
                        }
                        if (h_cishu == 0)
                        {
                            if (allist.Count > 0)
                            {
                                sb.Append(",");
                            }
                            sb.Append("{\"type\":\"text\",\"content\":\"" + model.aContent + "\"}");
                        }

                        sb.Append("]");

                        if (i < (artlist.Rows.Count - 1))
                        {
                            sb.Append("},");
                        }
                        else
                        {
                            sb.Append("}");
                        }
                    }
                }

                sb.Append("]);");
                context.Response.Write(sb.ToString());
                return;
            }
            #endregion

            #region 加载户型图片
            if (action == "htImg")
            {
                BLL.wx_fc_houseType htBll = new BLL.wx_fc_houseType();
                BLL.wx_fc_floor     fBll  = new BLL.wx_fc_floor();
                int fid  = MyCommFun.RequestInt("fid");
                int htid = MyCommFun.RequestInt("htid");

                if (htBll.GetRecordCount(string.Format(" fid={0} and wid={1} and id={2}", fid, wid, htid)) < 1)
                {
                    return;
                }

                Model.wx_fc_houseType htModel = htBll.GetModel(htid);
                Model.wx_fc_floor     fModel  = fBll.GetModel(fid);
                StringBuilder         sb      = new StringBuilder("showRooms({");//begin
                sb.Append("\"banner\":\"http://42.96.196.48/tpl/static/attachment/focus/default/../canyin/3.jpg\",");
                sb.Append("\"rooms\":[{");
                sb.Append("\"name\":\"" + htModel.Name + "\",");
                sb.Append("\"desc\":\"" + fModel.newsTitle + "\",");
                sb.Append("\"bimg\":\"" + MyCommFun.getWebSite() + htModel.htimgA + "\",");
                sb.Append("\"rooms\":\"" + htModel.houseType + "\",");
                sb.Append("\"area\":\" " + htModel.jzmj + "平方米\",");
                sb.Append("\"floor\":\"" + htModel.storey + "\",");
                sb.Append("\"width\":1600,");
                sb.Append("\"height\":1600,");
                sb.Append("\"pics\":[");
                //图片区,A
                List <string> ls = imgstr(htModel);
                for (int i = 0; i < ls.Count; i++)
                {
                    sb.Append("{\"img\":\"" + MyCommFun.getWebSite() + htModel.htimgA + "\",");
                    sb.Append("\"width\":760,");
                    sb.Append("\"height\":760,");
                    sb.Append("\"name\":\"" + htModel.Name + "\"}");
                    if (i != ls.Count)
                    {
                        sb.Append(",");
                    }
                }

                sb.Append("],");
                //图片end
                sb.Append("\"dtitle\":[\"建筑面积约" + htModel.jzmj + "平方米\"],");
                sb.Append("\"dlist\":[\"" + htModel.Jieshao + "\"]");
                sb.Append("}]})");//end
                context.Response.Write(sb.ToString());
                return;
            }
            #endregion
        }
Exemple #7
0
 void showInfo()
 {
     floor = fBll.GetModel(fid);
 }