Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     OnlyWeiXinLook();
     if (!IsPostBack)
     {
         wid    = MyCommFun.RequestInt("wid");
         openid = MyCommFun.RequestOpenid();
         aid    = MyCommFun.RequestInt("aid");
         if (wid == 0 || aid == 0)
         {
             MessageBox.Show(this, "参数不正确!");
             return;
         }
         BLL.wx_albums_info aBll = new BLL.wx_albums_info();
         albums = aBll.GetModel(aid);
         if (albums != null)
         {
             if (albums.music != null && albums.music.Trim() != "")
             {
                 bgMusic = "  var audio = new Audio();  audio.src = \"" + MyCommFun.getWebSite() + albums.music.Trim() + "\";  audio.play();";
                 // bgMusic = "  var audio = new Audio();  audio.src = \"http://bcs.duapp.com/baemp3mp3/mp3/138305426164953243.mp3\";  audio.play();";
             }
         }
         BindPhotoList();
     }
 }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            OnlyWeiXinLook();
            if (!IsPostBack)
            {
                wid = MyCommFun.RequestInt("wid");
                openid = MyCommFun.RequestOpenid();
                aid = MyCommFun.RequestInt("aid");
                if (wid == 0 || aid == 0)
                {
                    MessageBox.Show(this, "参数不正确!");
                    return;
                }
                BLL.wx_albums_info aBll = new BLL.wx_albums_info();
               albums = aBll.GetModel(aid);
                if (albums != null)
                {
                    if (albums.music != null && albums.music.Trim() != "")
                    {
                        bgMusic = "  var audio = new Audio();  audio.src = \"" + MyCommFun.getWebSite() + albums.music.Trim() + "\";  audio.play();";
                        // bgMusic = "  var audio = new Audio();  audio.src = \"http://bcs.duapp.com/baemp3mp3/mp3/138305426164953243.mp3\";  audio.play();";
                    }
                }
                BindPhotoList();

            }
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            OnlyWeiXinLook();
            if (!IsPostBack)
            {
                wid    = MyCommFun.RequestInt("wid");
                openid = MyCommFun.RequestOpenid();
                aid    = MyCommFun.RequestInt("aid");
                if (wid == 0 || aid == 0)
                {
                    MessageBox.Show(this, "参数不正确!");
                    return;
                }

                BLL.wx_albums_type           bll       = new BLL.wx_albums_type();
                IList <Model.wx_albums_type> modellist = bll.GetModelList("id=( select top 1  typeId from wx_albums_info where id=" + aid + ")");
                if (modellist != null && modellist.Count > 0 && modellist[0] != null && modellist[0].bannerPic != null && modellist[0].bannerPic.Trim() != "")
                {
                    litBanner.Text = "  <a href=\"javascript:;\"><img src=\"" + modellist[0].bannerPic + "\"></a> ";
                }
                BLL.wx_albums_info aBll = new BLL.wx_albums_info();
                albums = aBll.GetModel(aid);
                if (albums != null)
                {
                    if (albums.music != null && albums.music.Trim() != "")
                    {
                        string musicurl = albums.music.Trim();
                        if (albums.music.Trim().Contains("http://") || albums.music.Trim().Contains("https://"))
                        {
                        }
                        else
                        {
                            musicurl = MyCommFun.getWebSite() + albums.music.Trim();
                        }

                        albums.music = musicurl;
                        bgMusic      = "  var audio = new Audio();  audio.src = \"" + MyCommFun.getWebSite() + albums.music.Trim() + "\";  audio.play();";
                        // bgMusic = "  var audio = new Audio();  audio.src = \"http://bcs.duapp.com/baemp3mp3/mp3/138305426164953243.mp3\";  audio.play();";
                    }
                }
                BindPhotoList();

                litCopyRight.Text = getwebcopyright(wid);
            }
        }
Exemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     wid    = MXRequest.GetQueryInt("wid");
     openid = MyCommFun.RequestOpenid();
     if (!IsPostBack)
     {
         BLL.wx_wq_wzlx      wzBll = new BLL.wx_wq_wzlx();
         BLL.wx_albums_info  aiBll = new BLL.wx_albums_info();
         BLL.wx_albums_photo apBll = new BLL.wx_albums_photo();
         if (wzBll.GetRecordCount("wid=" + wid) > 0)
         {
             Model.wx_wq_wzlx     wzModel = wzBll.GetModelList("wid=" + wid)[0];
             Model.wx_albums_info aiModel = aiBll.GetModel(MyCommFun.Obj2Int(wzModel.pxcid));
             this.Title = aiModel.aName;
             this.rptList.DataSource = apBll.GetList(" aid=" + aiModel.id + " and wid=" + wid);
             this.rptList.DataBind();
         }
     }
 }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            OnlyWeiXinLook();
            if (!IsPostBack)
            {
                wid = MyCommFun.RequestInt("wid");
                openid = MyCommFun.RequestOpenid();
                aid = MyCommFun.RequestInt("aid");
                if (wid == 0 || aid==0)
                {
                    MessageBox.Show(this, "参数不正确!");
                    return;
                }

                BLL.wx_albums_type bll = new BLL.wx_albums_type();
                IList<Model.wx_albums_type> modellist = bll.GetModelList("id=( select top 1  typeId from wx_albums_info where id="+aid+")");
                if (modellist != null && modellist.Count > 0 && modellist[0] != null && modellist[0].bannerPic != null && modellist[0].bannerPic.Trim()!="")
                {
                    litBanner.Text = "  <a href=\"javascript:;\"><img src=\"" + modellist[0].bannerPic + "\"></a> ";
                    
                }
                BLL.wx_albums_info aBll = new BLL.wx_albums_info();
               albums = aBll.GetModel(aid);
                if (albums != null)
                {
                    if (albums.music != null && albums.music.Trim() != "")
                    {
                        albums.music = MyCommFun.getWebSite() + albums.music.Trim();
                       bgMusic = "  var audio = new Audio();  audio.src = \"" +MyCommFun.getWebSite()+ albums.music.Trim() + "\";  audio.play();";
                        // bgMusic = "  var audio = new Audio();  audio.src = \"http://bcs.duapp.com/baemp3mp3/mp3/138305426164953243.mp3\";  audio.play();";
                    }
                }
                BindPhotoList();
              
                litCopyRight.Text = getwebcopyright(wid);
            }
        }
Exemplo n.º 6
0
        private void ShowInfo(int id)
        {
            hidid.Value = id.ToString();
            Model.wx_albums_info albums = alBll.GetModel(id);
            hidid.Value       = albums.id.ToString();
            txtaName.Text     = albums.aName.ToString();
            txtaContent.Value = albums.aContent;
            txtseq.Text       = albums.seq.Value.ToString();
            if (albums.showContent)
            {
                rblshowContent.SelectedValue = "1";
            }
            else
            {
                rblshowContent.SelectedValue = "0";
            }

            if (albums.isHidden)
            {
                rblisHidden.SelectedValue = "1";
            }
            else
            {
                rblisHidden.SelectedValue = "0";
            }
            ddlCategoryId.SelectedValue = albums.typeId.ToString();

            //封面图片
            if (albums.facePic != null && albums.facePic.Trim() != "/images/noneimg.jpg")
            {
                txtImgUrl.Text         = albums.facePic;
                imgfacePicPic.ImageUrl = albums.facePic;
            }
            txtMusic.Text             = albums.music;
            radshowType.SelectedValue = albums.showType == null?"1":albums.showType.ToString();
        }
Exemplo n.º 7
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            int id = MyCommFun.Str2Int(hidid.Value);

            #region  //先判断
            string strErr = "";
            if (this.txtaName.Text.Trim().Length == 0)
            {
                strErr += "相册名称不能为空!";
            }

            if (strErr != "")
            {
                JscriptMsg(strErr, "back", "Error");
                return;
            }

            #endregion

            #region 赋值
            Model.wx_albums_info albums = new Model.wx_albums_info();

            if (id > 0)
            {
                albums = alBll.GetModel(id);
            }

            string facePicc = imgfacePicPic.ImageUrl;
            if (txtImgUrl.Text.Trim() != "")
            {
                facePicc = txtImgUrl.Text.Trim();
            }
            albums.aName       = txtaName.Text.Trim();
            albums.aContent    = txtaContent.Value.Trim();
            albums.showContent = rblshowContent.SelectedItem.Value == "1" ? true : false;
            albums.isHidden    = rblisHidden.SelectedItem.Value == "1" ? true : false;
            albums.seq         = MyCommFun.Str2Int(txtseq.Text.Trim());
            albums.facePic     = facePicc;
            albums.typeId      = MyCommFun.Str2Int(ddlCategoryId.SelectedItem.Value);
            albums.music       = txtMusic.Text;
            albums.showType    = MyCommFun.Str2Int(radshowType.SelectedItem.Value);
            #endregion

            if (id <= 0)
            {  //新增
                albums.wid        = weixin.id;
                albums.createDate = DateTime.Now;
                //1新增主表
                id = alBll.Add(albums);


                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加相册信息,主键为" + id); //记录日志
                JscriptMsg("添加相册信息成功!", "index.aspx", "Success");
            }
            else
            {   //修改
                alBll.Update(albums);

                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改相册信息,主键为" + id); //记录日志
                JscriptMsg("修改相册信息成功!", "index.aspx", "Success");
            }
        }
Exemplo n.º 8
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            Model.wx_userweixin weixin = GetWeiXinCode();
            int id = MyCommFun.Str2Int(hidid.Value);
            #region  //先判断
            string strErr = "";
            if (this.txtaName.Text.Trim().Length == 0)
            {
                strErr += "相册名称不能为空!";
            }
            
            if (strErr != "")
            {
                JscriptMsg(strErr, "back", "Error");
                return;
            }
             
            #endregion

            #region 赋值
            Model.wx_albums_info albums = new Model.wx_albums_info();
          
            if (id > 0)
            {
                albums = alBll.GetModel(id);
            }

            string facePicc = imgfacePicPic.ImageUrl;
            if (txtImgUrl.Text.Trim() != "")
            {
                facePicc = txtImgUrl.Text.Trim();
            }
            albums.aName = txtaName.Text.Trim();
            albums.aContent = txtaContent.Value.Trim();
            albums.showContent = rblshowContent.SelectedItem.Value == "1" ? true : false;
            albums.isHidden = rblisHidden.SelectedItem.Value == "1" ? true : false;
            albums.seq = MyCommFun.Str2Int(txtseq.Text.Trim());
            albums.facePic = facePicc;
            albums.typeId = MyCommFun.Str2Int(ddlCategoryId.SelectedItem.Value);
            albums.music = txtMusic.Text;
            albums.showType =MyCommFun.Str2Int( radshowType.SelectedItem.Value);
            #endregion

            if (id <= 0)
            {  //新增
                albums.wid = weixin.id;
                albums.createDate = DateTime.Now;
                //1新增主表
                id = alBll.Add(albums);

              
                AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加相册信息,主键为" + id); //记录日志
                JscriptMsg("添加相册信息成功!", "index.aspx", "Success");
            }
            else
            {   //修改
               
                alBll.Update(albums);

                AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改相册信息,主键为" + id); //记录日志
                JscriptMsg("修改相册信息成功!", "index.aspx", "Success");
            }

        }
Exemplo n.º 9
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
        }
Exemplo n.º 10
0
        /// <summary>
        /// 绑定相册的封面以及其他基本信息
        /// </summary>
        private void BindAlbumsList()
        {
            BLL.wx_albums_info           bll   = new BLL.wx_albums_info();
            IList <Model.wx_albums_info> alist = new List <Model.wx_albums_info>();

            if (tid == 0)
            {
                alist = bll.GetModelList("wid=" + wid + " and  isHidden=0 order by seq asc ");
            }
            else
            {
                alist = bll.GetModelList("wid=" + wid + " and  isHidden=0 and typeId=" + tid + " order by seq asc");
            }
            StringBuilder sb = new StringBuilder("");

            if (alist == null || alist.Count <= 0)
            {
                return;
            }
            Model.wx_albums_info albums = new Model.wx_albums_info();
            for (int i = 0; i < alist.Count; i++)
            {
                albums = alist[i];
                if (albums.showContent)
                {   //显示描述
                    sb.Append(" <li class=\"media mediaFullText\">");
                    if (albums.showType == 2)
                    {
                        //摇一摇
                        sb.Append(" <a href=\"photoy1y.aspx?aid=" + albums.id + "&wid=" + wid + "&openid=" + openid + "\">");
                    }
                    else
                    {
                        sb.Append(" <a href=\"photo.aspx?aid=" + albums.id + "&wid=" + wid + "&openid=" + openid + "\">");
                    }

                    sb.Append(" <div class=\"mediaPanel\"><div class=\"mediaHead\">");
                    sb.Append("  <span class=\"title\">" + albums.aName + "</span>");
                    sb.Append("<div class=\"clr\"></div></div>");
                    sb.Append("<div class=\"mediaImg\">");
                    sb.Append("<img src=\"" + albums.facePic + "\">");
                    sb.Append("</div>");

                    sb.Append(" <div class=\"mediaContent mediaContentP\"> <p>" + albums.aContent + "</p></div>");

                    sb.Append(" <div class=\"mediaFooter\">");
                    sb.Append("<span class=\"mesgIcon right\"></span><span class=\"bt\">查看全部</span>");
                    sb.Append("<div class=\"clr\"></div>");
                    sb.Append("  </div>  </div>");
                }
                else
                { //不显示描述
                    sb.Append(" <li class=\"media mediaFullText\">");
                    if (albums.showType == 2)
                    {
                        //摇一摇
                        sb.Append(" <a href=\"photoy1y.aspx?aid=" + albums.id + "&wid=" + wid + "&openid=" + openid + "\">");
                    }
                    else
                    {
                        sb.Append(" <a href=\"photo.aspx?aid=" + albums.id + "&wid=" + wid + "&openid=" + openid + "\">");
                    }
                    sb.Append(" <div class=\"mediaPanel\"><div class=\"mediaHead\">");
                    sb.Append("<div class=\"clr\"></div></div>");
                    sb.Append("<div class=\"mediaImg\">");
                    sb.Append("<img src=\"" + albums.facePic + "\">");
                    sb.Append("</div>");
                    sb.Append(" <div class=\"mediaFooter\">");
                    sb.Append("<span class=\"mesgIcon right\"></span><span class=\"bt\">" + albums.aName + "</span>");
                    sb.Append("<div class=\"clr\"></div>");
                    sb.Append("  </div>  </div>");
                }
            }//end for

            litAlbumsList.Text = sb.ToString();
        }
Exemplo n.º 11
0
        /// <summary>
        /// 绑定相册的封面以及其他基本信息
        /// </summary>
        private void BindAlbumsList()
        {
            BLL.wx_albums_info bll = new BLL.wx_albums_info();
            IList<Model.wx_albums_info> alist = new List<Model.wx_albums_info>();
            if (tid == 0)
            {
                alist = bll.GetModelList("wid=" + wid + " and  isHidden=0 order by seq asc ");
            }
            else
            {
                alist = bll.GetModelList("wid=" + wid + " and  isHidden=0 and typeId=" + tid + " order by seq asc");
            }
            StringBuilder sb = new StringBuilder("");
            if (alist == null || alist.Count <= 0)
            {
                return;
            }
            Model.wx_albums_info albums = new Model.wx_albums_info();
            for (int i = 0; i < alist.Count; i++)
            {
                albums = alist[i];
                if (albums.showContent)
                {   //显示描述
                    sb.Append(" <li class=\"media mediaFullText\">");
                    if (albums.showType == 2)
                    {
                        //摇一摇
                        sb.Append(" <a href=\"photoy1y.aspx?aid=" + albums.id + "&wid=" + wid + "&openid=" + openid + "\">");
                    }
                    else
                    {
                        sb.Append(" <a href=\"photo.aspx?aid=" + albums.id + "&wid=" + wid + "&openid=" + openid + "\">");
                    }

                    sb.Append(" <div class=\"mediaPanel\"><div class=\"mediaHead\">");
                    sb.Append("  <span class=\"title\">" + albums.aName + "</span>");
                    sb.Append("<div class=\"clr\"></div></div>");
                    sb.Append("<div class=\"mediaImg\">");
                    sb.Append("<img src=\"" + albums.facePic + "\">");
                    sb.Append("</div>");

                    sb.Append(" <div class=\"mediaContent mediaContentP\"> <p>" + albums.aContent + "</p></div>");

                    sb.Append(" <div class=\"mediaFooter\">");
                    sb.Append("<span class=\"mesgIcon right\"></span><span class=\"bt\">查看全部</span>");
                    sb.Append("<div class=\"clr\"></div>");
                    sb.Append("  </div>  </div>");
                }
                else
                { //不显示描述
                    sb.Append(" <li class=\"media mediaFullText\">");
                    if (albums.showType == 2)
                    {
                        //摇一摇
                        sb.Append(" <a href=\"photoy1y.aspx?aid=" + albums.id + "&wid=" + wid + "&openid=" + openid + "\">");
                    }
                    else
                    {
                        sb.Append(" <a href=\"photo.aspx?aid=" + albums.id + "&wid=" + wid + "&openid=" + openid + "\">");
                    }
                    sb.Append(" <div class=\"mediaPanel\"><div class=\"mediaHead\">");
                    sb.Append("<div class=\"clr\"></div></div>");
                    sb.Append("<div class=\"mediaImg\">");
                    sb.Append("<img src=\"" + albums.facePic + "\">");
                    sb.Append("</div>");
                    sb.Append(" <div class=\"mediaFooter\">");
                    sb.Append("<span class=\"mesgIcon right\"></span><span class=\"bt\">" + albums.aName + "</span>");
                    sb.Append("<div class=\"clr\"></div>");
                    sb.Append("  </div>  </div>");
                }

            }//end for

            litAlbumsList.Text = sb.ToString();
        }