void ShowInfo(string strID)
        {
            ChatRoomDAL dal   = new ChatRoomDAL();
            DataSet     ds    = dal.GetChatRoomDetail(Convert.ToInt32(strID), Session["strSiteCode"].ToString());
            ChatRoom    model = DataConvert.DataRowToModel <ChatRoom>(ds.Tables[0].Rows[0]);

            RoomName.Text    = model.RoomName;
            hd_content.Value = model.RoomDesc;
            if (model.RoomImg != null && model.RoomImg != "")
            {
                img0.Src = "../../WXWall/" + model.RoomImg;
            }
            if (model.WebCodeImg != null && model.WebCodeImg != "")
            {
                img1.Src = "../../WXWall/" + model.WebCodeImg;
            }
            RoomNum.Text = model.ID.ToString();
            if (model.AppID != null && model.AppID != "")
            {
                appid.Text = model.AppID.ToString();
            }
            phonenum.Text = model.PhoneNum.ToString();
            if (strAction == "show")
            {
                this.btnReset.Visible = false;
                this.btnSave.Visible  = false;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 聊天室详细
        /// </summary>
        void MsgDetail()
        {
            DataSet  rmdetailds    = rmdal.GetChatRoomDetail(Convert.ToInt32(strRoomID), strSiteCode);
            ChatRoom rmdetailmodel = new ChatRoom();

            if (null != rmdetailds && rmdetailds.Tables.Count > 0 && rmdetailds.Tables[0].Rows.Count > 0)
            {
                walltitle = rmdetailds.Tables[0].Rows[0]["RoomName"].ToString();
                var rmbgimgurl   = rmdetailds.Tables[0].Rows[0]["RoomImg"].ToString();
                var rmwebcodeimg = rmdetailds.Tables[0].Rows[0]["WebCodeImg"].ToString();
                if (rmbgimgurl.Trim() != null && rmbgimgurl.Trim() != "")
                {
                    bgimgurl = "style=\"background-image: url(" + rmbgimgurl + ");\"";
                }
                if (rmwebcodeimg.Trim() != null && rmwebcodeimg.Trim() != "")
                {
                    codimg = rmwebcodeimg;
                }
                else
                {
                    codimg = "images/photo-default.png";
                }
                appid = rmdetailds.Tables[0].Rows[0]["AppID"].ToString();
                if (appid.Trim() != null && appid.Trim() != "")
                {
                    appid = "无法扫描二维码的用户,请关注微信号:<br/><span class=\"redfont\">" + appid + "</span>";
                }
            }
            msgcount = msgdal.GetChatMsgCount(strRoomID).ToString();
        }