private void RptBind(string _strWhere, string _orderby) { this.page = DTRequest.GetQueryInt("page", 1); BLL.member bll = new BLL.member(); this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); this.rptList.DataBind(); }
private void RptBind(string _strWhere, string _orderby) { BLL.member bll = new BLL.member(); BLL.member studentBll = new BLL.member(); this.rptList.Visible = true; this.rptList.DataSource = bll.GetList(0, _strWhere, _orderby); this.rptList.DataBind(); txtKeywords.Text = this.keywords; }
private void RptBind(string _strWhere, string _orderby) { this.page = DTRequest.GetQueryInt("page", 1); BLL.member bll = new BLL.member(); this.rptList.DataSource = bll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("member_list.aspx", "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
//public void loaddata() //{ // //Session["open_id"] = "ozBiSt0zxI4W3ROkC4Xf0IxAC_Qg"; // if (Session["open_id"] == null ) // { // Response.Write("<script>alert('感谢您进入温氏学院系统!')</script>"); // code = Request.QueryString["code"]; // if (code != null && code != "") // { // //Response.Write("<script>alert('这是code:" + code + "')</script>"); // WebClient requestClinet = new WebClient(); // string jsonArray = requestClinet.DownloadString("https://api.weixin.qq.com/sns/oauth2/access_token?appid=zheshiyigejiadeid&secret=zhendemimazaibendibaocun&code=" + code + "&grant_type=authorization_code"); // //Response.Write("<script>alert('这是json:" + jsonArray + "')</script>"); // JavaScriptSerializer json = new JavaScriptSerializer(); // List<User> list = json.Deserialize<List<User>>("[" + jsonArray + "]"); // if (list.Count>0) // { // //Response.Write("<script>alert('"+list[0].openid+"!')</script>"); // Session["open_id"] = list[0].openid; // if (data_name_exit(Session["open_id"].ToString()) == 0) // { // Response.Write("<script>alert('尚未填入培训信息');window.location='mem_info_fill.aspx'</script>"); // } // else // { // //Response.Write("<script>alert('最后一个')</script>"); // Maticsoft.BLL.member mem_bll = new BLL.member(); // DataSet ds_mem = mem_bll.GetList("[openid]= '" + Session["open_id"].ToString() + "'"); // string name = ""; // if (ds_mem != null && ds_mem.Tables[0].Rows.Count > 0) // { // name = ds_mem.Tables[0].Rows[0]["name"].ToString(); // } // string open_id = Session["open_id"].ToString().Trim(); // Maticsoft.BLL.weixin wx = new BLL.weixin(); // string nickname = wx.get_userinfo(open_id, wx.get_web_accesstoken(code))[0].nickname; // openid.Text = "您好," + name + "(" + nickname + "),欢迎进入温氏培训系统" + open_id.Trim() + "另11111外" + wx.get_web_accesstoken(code); // touxiang.ImageUrl = wx.get_userinfo(open_id, wx.get_web_accesstoken(code))[0].headimgurl; // Session["name"] = name; // } // }else // { // Response.Write("<script>alert('获取微信openid失败')</script>"); // } // }else // { // Response.Write("<script>alert('请从微信端登陆系统');window.location='error.aspx'</script>"); // } // }else if(data_openid_exit(Session["open_id"].ToString())==0) // { // Response.Write("<script>alert('请填入你的培训信息');window.location='mem_info_fill.aspx'</script>"); // Maticsoft.BLL.member mem_bll = new BLL.member(); // Maticsoft.Model.member mem_mod = new Model.member(); // mem_mod.openid = Session["open_id"].ToString(); // mem_mod.name = "空"; // mem_bll.Add(mem_mod); // } // else if (data_name_exit(Session["open_id"].ToString()) == 0) // { // Response.Write("<script>alert('尚未填入培训信息');window.location='mem_info_fill.aspx'</script>"); // //Maticsoft.Common.MessageBox.ShowAndRedirect(this,"尚未填入培训信息","user_info_fill.aspx"); // } // else // { // //Response.Write("<script>alert('最后一个')</script>"); // Maticsoft.BLL.member mem_bll=new BLL.member(); // DataSet ds_mem = mem_bll.GetList("[openid]= '" + Session["open_id"].ToString() + "'"); // string name = ""; // if (ds_mem != null && ds_mem.Tables[0].Rows.Count > 0) // { // name = ds_mem.Tables[0].Rows[0]["name"].ToString(); // } // string open_id = Session["open_id"].ToString().Trim(); // Maticsoft.BLL.weixin wx = new BLL.weixin(); // string nickname = wx.get_userinfo(open_id, wx.get_web_accesstoken(code))[0].nickname; // openid.Text = "您好," + name + "(" + nickname + "),欢迎进入温氏培训系统测试版" + open_id + "啊啊啊啊啊" + wx.get_web_accesstoken(code); // touxiang.ImageUrl = wx.get_userinfo(open_id, wx.get_web_accesstoken(code))[0].headimgurl; // Session["name"] = name; // } //} public int data_openid_exit(string openid) { //Response.Write("<script>alert('开始判断openid是否存在数据库')</script>"); Maticsoft.BLL.member mem_bll = new BLL.member(); DataSet ds_mem = mem_bll.GetList(" [openid]= '" + openid + "'"); if (ds_mem == null || ds_mem.Tables[0].Rows.Count == 0) { return(0); } else { return(1); } }
public int data_name_exit(string openid) { //Response.Write("<script>alert('开始判断name是否存在数据库')</script>"); Maticsoft.BLL.member mem_bll = new BLL.member(); DataSet ds_mem = mem_bll.GetList("[openid]= '" + openid + "'"); string name = ""; if (ds_mem != null && ds_mem.Tables[0].Rows.Count > 0) { name = ds_mem.Tables[0].Rows[0]["name"].ToString(); } if (name.Trim() == "空" || name.Trim() == "") { return(0); } else { return(1); } }
public void loaddata() { Maticsoft.BLL.member mem_bll = new BLL.member(); DataTable dt = mem_bll.GetList("fenzu_id is null and style='2'").Tables[0]; if (dt.Rows.Count > 0) { openid.Text = dt.Rows[0]["openid"].ToString(); name.Text = dt.Rows[0]["name"].ToString(); date_time.Text = dt.Rows[0]["time"].ToString(); Maticsoft.BLL.weixin wx_bll = new BLL.weixin(); weixn_nickname.Text = wx_bll.get_userinfo(dt.Rows[0]["openid"].ToString(), wx_bll.get_accesstoken())[0].nickname; Maticsoft.BLL.teacher tea_bll = new BLL.teacher(); DataSet ds = tea_bll.GetList(""); DropDownList1.DataSource = ds; DropDownList1.DataTextField = "name"; DropDownList1.DataValueField = "id"; DropDownList1.DataBind(); } }
private void BindInfo(int typeid) { string where = string.Empty; string s = Members.Value; string num = Days.Value; string str = "and Mid like '%" + s + "%' or Name like '%" + s + "%' or Phone like '%" + s + "%'"; if (s == "") { str = string.Empty; } if (Status.SelectedValue != "-1") { where = "and Statid=" + Status.SelectedValue + ""; } if (typeid != 0) { if (num != "") { rep1.DataSource = bllm.GetList("Mtype=" + typeid + "" + where + " " + str + " and (MONTH(Baithday) = MONTH(GetDate())) AND (DAY(Baithday) BETWEEN DAY(GetDate()) AND DAY(Getdate()) +" + num + ")"); } else { rep1.DataSource = bllm.GetList("Mtype=" + typeid + "" + where + " " + str + ""); } } else { if (num != "") { rep1.DataSource = bllm.GetList("Mtype!=0 " + where + " " + str + " and (MONTH(Baithday) = MONTH(GetDate())) AND (DAY(Baithday) BETWEEN DAY(GetDate()) AND DAY(Getdate()) +" + num + ")"); } else { rep1.DataSource = bllm.GetList("Mtype!=0 " + where + " " + str + ""); } } rep1.DataBind(); }
/// <summary> /// 通过openid获取真实姓名 /// </summary> /// <param name="openid"></param> /// <returns></returns> public string get_name(string openid) { string name = ""; Maticsoft.BLL.member mem_bll = new BLL.member(); if (!string.IsNullOrEmpty(openid)) { DataSet ds_mem = mem_bll.GetList("[openid]= '" + openid.Trim() + "'"); if (ds_mem != null && ds_mem.Tables[0].Rows.Count > 0) { name = ds_mem.Tables[0].Rows[0]["name"].ToString(); } else { name = "空"; } } else { name = openid + "无名"; } return(name); }