private void ShowInfo(int _id) { BLL.wx_crm_users uBll = new BLL.wx_crm_users(); Model.wx_crm_users user = uBll.GetModel(_id); BLL.wx_crm_group gBll = new BLL.wx_crm_group(); Model.wx_crm_group group = gBll.GetModel(user.groupId.Value); BLL.wx_crm_users_tag tBll = new BLL.wx_crm_users_tag(); Model.wx_userweixin weixin = GetWeiXinCode(); Model.wx_crm_users_tag tagEntity = tBll.GetModelByWidAndOpenid(weixin.id, user.openid); lblnickname.Text = user.nickname; imgPhoto.ImageUrl = user.headimgurl; lblSex.Text = GetUserSex(int.Parse(user.sex)); lblArea.Text = user.country + " " + user.province + " " + user.city; lblsubscribe_time.Text = MyCommFun.GetTime(user.subscribe_time).ToString(); prov = user.province; if (group != null) { lblGroupName.Text = group.name; } if (tagEntity != null) { hidtagId.Value = tagEntity.id.ToString(); txtTag.Text = tagEntity.tag; } hidWid.Value = user.wid.ToString(); hidOpenid.Value = user.openid; }
private void RptBind(string _strWhere, string _orderby) { this.page = MXRequest.GetQueryInt("page", 1); if (this.group_id > 0) { this.ddlGroupId.SelectedValue = this.group_id.ToString(); } if (this.status.Trim().Length > 0) { this.ddlstatus.SelectedValue = this.status.ToString(); } this.txtKeywords.Text = this.keywords; BLL.wx_crm_users bll = new BLL.wx_crm_users(); DataSet ds = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { DataRow dr; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { dr = ds.Tables[0].Rows[i]; dr["subscribe_time"] = MyCommFun.GetTime(dr["subscribe_time"].ToString()).ToString(); } } this.rptList.DataSource = ds; this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("user_list.aspx", "status={0}&group_id={1}&keywords={2}&page={3}", this.status.ToString(), this.group_id.ToString(), this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }