protected void Page_Load(object sender, EventArgs e) { yiModel = new Model.wx_fc_yyInfo(); wid = MXRequest.GetQueryInt("wid"); fid = MXRequest.GetQueryInt("fid"); openid = MyCommFun.RequestOpenid(); if (!IsPostBack) { int yid = MXRequest.GetQueryInt("yid"); if (yid > 0) { yiModel = yiBll.GetModel(yid); addOrEdit = yiModel.Id; } showInfo(); } }
protected void Page_Load(object sender, EventArgs e) { shopid = MyCommFun.RequestInt("shopid"); type = MyCommFun.QueryString("type"); ids = MyCommFun.RequestInt("id"); if (!Page.IsPostBack) { if (type == "edite")//修改 { caipin = caipinbll.GetModel(ids); this.sortid.Text = caipin.sortid.ToString(); this.categoryName.Text = caipin.categoryName; this.miaoshu.Text = caipin.miaoshu; this.isStart.SelectedValue = caipin.isStart.ToString(); } } }
private void RptBind(string _strWhere, string _orderby) { int aid = MyCommFun.RequestInt("id"); _strWhere = "actid=" + aid + " " + _strWhere; this.page = MXRequest.GetQueryInt("page", 1); txtKeywords.Text = this.keywords; DataSet ds = ubll.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; int count = ds.Tables[0].Rows.Count; var table = ds.Tables[0]; table.Columns.Add("nickName"); table.Columns.Add("headimgurl"); for (int i = 0; i < count; i++) { dr = table.Rows[i]; var openid = dr["openid"].ToString(); if (!string.IsNullOrEmpty(openid)) { var userDto = _userService.Get(openid); if (userDto != null) { var headImg = MyCommFun.getWebSite() + "/images/weichatDefaultHeadImg.jpg"; if (!string.IsNullOrEmpty(userDto.headimgurl)) { headImg = userDto.headimgurl; } dr["nickName"] = userDto.nickname; dr["headimgurl"] = headImg; } } } ds.AcceptChanges(); } this.rptList.DataSource = ds; this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("luckyMoneyAwardUser.aspx", "id={0}&keywords={1}&page={2}", MyCommFun.RequestInt("id").ToString(), this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
override protected void OnInit(EventArgs e) { base.OnInit(e); if (errInitTemplates != "") { Response.Write(errInitTemplates); return; } tPath = MyCommFun.GetRootPath() + "/templates_portal/help.html"; PortalTemplate template = new PortalTemplate(tPath); template.tType = TemplateType.News; template.OutPutHtml(templateIndexFileName); }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { this.shopid = MyCommFun.RequestInt("shopid"); this.openid = MyCommFun.QueryString("openid"); this.shopinfo = this.shopBll.GetModel(this.shopid); this.hotelName = this.shopinfo.hotelName; this.rename = this.shopinfo.dcRename; if (this.openid != "") { this.List(this.openid); } } }
/// <summary> /// 用户中心 /// </summary> public void userinfoPage() { BLL.orders oBll = new BLL.orders(); //待付款的 int wid = MyCommFun.RequestInt("wid"); string openid = MyCommFun.RequestOpenid(); IList <Model.orders> orderlist_dfu = oBll.GetModelList(" wid=" + wid + " and openid='" + openid + "' and payment_id in (2,3) and payment_status=1 and status=1 order by id desc"); if (orderlist_dfu != null) { for (int i = 0; i < orderlist_dfu.Count; i++) { orderlist_dfu[i].status = GetOrderStatus_int(orderlist_dfu[i].status, orderlist_dfu[i].payment_status, orderlist_dfu[i].express_status); } this.Document.SetValue("o_dfu", orderlist_dfu); this.Document.SetValue("dfk_num", orderlist_dfu.Count); } //待收货的 IList <Model.orders> orderlist_dsh = oBll.GetModelList(" wid=" + wid + " and openid='" + openid + "' and (payment_status=2 or payment_id=1) and status not in(3,4,5) order by id desc"); if (orderlist_dsh != null) { for (int i = 0; i < orderlist_dsh.Count; i++) { orderlist_dsh[i].status = GetOrderStatus_int(orderlist_dsh[i].status, orderlist_dsh[i].payment_status, orderlist_dsh[i].express_status); } this.Document.SetValue("o_dsh", orderlist_dsh); this.Document.SetValue("dsh_num", orderlist_dsh.Count); } //已结束的 IList <Model.orders> orderlist_yjs = oBll.GetModelList(" wid=" + wid + " and openid='" + openid + "' and payment_status=2 and status in (3,4,5) order by id desc"); if (orderlist_yjs != null) { for (int i = 0; i < orderlist_yjs.Count; i++) { orderlist_yjs[i].status = GetOrderStatus_int(orderlist_yjs[i].status, orderlist_yjs[i].payment_status, orderlist_yjs[i].express_status); } this.Document.SetValue("o_yjs", orderlist_yjs); this.Document.SetValue("yjs_num", orderlist_yjs.Count); } }
public string DetailUrl(int wid, int id, float x, float y, string wUrl) { string openid = MyCommFun.RequestOpenid(); string newurl = ""; if (wUrl == null || wUrl.ToString().Trim().Length <= 0) { //到detailAddr.aspx newurl = "detailAddr.aspx?shopid=" + id.ToString() + "&x=" + x.ToString() + "&y=" + y.ToString() + "&wid=" + wid.ToString() + "&openid=" + openid; } else { newurl = MyCommFun.urlAddOpenid(wUrl.ToString(), openid); } return(newurl); }
private void BindData() { BLL.wx_sq_act actBll = new BLL.wx_sq_act(); Model.wx_sq_act act = actBll.GetModel(aid); if (act != null) { litBanner.Text = " <img src=\"" + act.bannerPic + "\">"; } BLL.wx_sq_piclist pBll = new BLL.wx_sq_piclist(); string whereStr = ""; if (act.shenghe) { //需要审核 whereStr = "aid=" + aid + " and hasShenghe=1"; } else { //不需要审核 whereStr = "aid=" + aid; } // IList<Model.wx_sq_piclist> plist = pBll.GetModelList(whereStr); DataSet artDs = pBll.GetList(20, this.page, whereStr, "createDate desc", out this.totalCount); rpPoto.DataSource = artDs; rpPoto.DataBind(); //上一页 if (this.page == 1) { aBefore.HRef = "javascript:;"; } else { aBefore.HRef = MyCommFun.getWebSite() + "/weixin/shangqiang/index.aspx?wid=" + wid + "&aid=" + aid + "&openid=" + openid + "&p=" + (this.page - 1); } //下一页 if (this.page == totalCount) { aAfter.HRef = "javascript:;"; } else { aAfter.HRef = MyCommFun.getWebSite() + "/weixin/shangqiang/index.aspx?wid=" + wid + "&aid=" + aid + "&openid=" + openid + "&p=" + (this.page + 1); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var rid = MyCommFun.QueryString("rid"); this.hidrId.Value = rid; var id = MyCommFun.QueryString("id"); this.hidId.Value = id; this.hidAction.Value = MyCommFun.QueryString("option"); if (MyCommFun.QueryString("option") == "edit") { BindData(int.Parse(id)); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { OnlyWeiXinLook(); wid = MyCommFun.RequestInt("wid", 0); openid = MyCommFun.RequestOpenid(); if (wid == 0 || openid.Trim() == "") { hidStatus.Value = "1"; hidErrInfo.Value = "访问参数错误!"; return; } BindData(); } }
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; } page = MyCommFun.RequestInt("p", 1); BindData(); } }
/// <summary> /// 获得图片的url /// </summary> /// <param name="orginUrl"></param> /// <returns></returns> public string getPicUrl(string orginUrl) { if (orginUrl == null) { return(""); } string ret = orginUrl; if (ret.IndexOf("http") <= 0 || ret.IndexOf("www") <= 0) { return(ret); } else { return(MyCommFun.getWebSite() + orginUrl); } }
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); } }
/// <summary> /// 授权判断获取openid,如果code为空页面跳转 /// </summary> /// <param name="model"></param> /// <param name="state"></param> /// <param name="code">默认读取请求中的code属性</param> /// <param name="targetUrl">目标地址</param> protected string OAuth2BaseProc(Model.wx_userweixin model, string state, string code, string targetUrl) { string openid = String.Empty; #if DEBUG string isTest = MyCommFun.getAppSettingValue("isOAuthTest"); if (isTest == "1") { openid = MyCommFun.RequestOpenid(); return(openid); } #endif //如果不传 if (string.IsNullOrEmpty(code)) { code = MyCommFun.QueryString("code"); } if (code == null || code.Trim() == "") { if (targetUrl == null || targetUrl.Trim() == "") { targetUrl = MyCommFun.getTotalUrl(); } //thisUrl = MyCommFun.getWebSite() + "/weixin/huodong/index.aspx"; string newUrl = OAuthApi.GetAuthorizeUrl(model.AppId, targetUrl, state, OAuthScope.snsapi_base); //41008 缺少oauth code throw new UnAuthException(newUrl, "41008"); } else { if (MyCommFun.getCookie("cookie_openid") == "") { OAuthAccessTokenResult result = OAuthApi.GetAccessToken(model.AppId, model.AppSecret, code); openid = result.openid; MyCommFun.setCookie("cookie_openid", openid, 100); } openid = MyCommFun.getCookie("cookie_openid"); } return(openid); }
protected void Page_Load(object sender, EventArgs e) { bll = new WXUserService(new WXUserRepository()); string _action = MXRequest.GetQueryString("action"); if (!string.IsNullOrEmpty(_action) && _action == MXEnums.ActionEnum.Edit.ToString()) { this.action = MXEnums.ActionEnum.Edit.ToString();//修改类型 if (!int.TryParse(Request.QueryString["id"] as string, out this.id)) { JscriptMsg("传输参数不正确!", "back", "Error"); return; } if (!bll.Exists(this.id)) { JscriptMsg("记录不存在或已被删除!", "back", "Error"); return; } } else { //添加,则需要判断可以添加的微信号数量 if (IsChaoGuoWxNum()) { return; } } if (!Page.IsPostBack) { txtapiurl.Text = MyCommFun.getWebSite() + "/api/weixin/api.aspx"; // ChkAdminLevel("manager_list", MXEnums.ActionEnum.View.ToString()); //检查权限 //1e2124dd04e11d01b9df2865f85944be var model = GetAdminInfo(); //取得管理员信息 if (action == MXEnums.ActionEnum.Edit.ToString()) //修改 { ShowInfo(this.id); } else { txtEncodingAESKey.Text = Utils.GetLetterOrNumberRandom(43); txtwxToken.Text = Utils.GetLetterOrNumberRandom(10); } } }
protected void Button1_Click(object sender, EventArgs e) { Model.wx_userweixin weixin = GetWeiXinCode(); int wid = weixin.id; BLL.wx_message_setting settingBll = new BLL.wx_message_setting(); int id = MyCommFun.Obj2Int(hidId.Value); //DataSet dr = gbll.GetList(wid); string title = this.title.Text.ToString(); string adminOpenid = ""; string picurl = this.picurl.Text.ToString(); bool needSH = Convert.ToBoolean(this.needSH.SelectedValue); if (id > 0) { //update Model.wx_message_setting setting = settingBll.GetModel(id); setting.wid = wid; setting.title = title; setting.adminOpenid = adminOpenid; setting.picUrl = picurl; setting.needSH = needSH; settingBll.Update(setting); AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改留言板基本设置,主键为" + id); //记录日志 JscriptMsg("修改成功", "AddMessage.aspx", "Success"); } else { Model.wx_message_setting setting = new Model.wx_message_setting(); setting.wid = wid; setting.title = title; setting.adminOpenid = adminOpenid; setting.picUrl = picurl; setting.needSH = needSH; int iid = settingBll.Add(setting); AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加留言板基本设置,主键为" + iid); //记录日志 JscriptMsg("添加成功", "AddMessage.aspx", "Success"); } }
private void RptBind(int _channel_id, int _category_id, string _strWhere, string _orderby) { Model.wx_userweixin weixin = GetWeiXinCode(); this.page = MXRequest.GetQueryInt("page", 1); this.txtKeywords.Text = this.keywords; //图表或列表显示 BLL.article bll = new BLL.article(); DataSet ds = bll.GetWCodeList(weixin.id, _channel_id, _category_id, this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { DataRow dr; int cout = ds.Tables[0].Rows.Count; for (int i = 0; i < cout; i++) { dr = ds.Tables[0].Rows[i]; string linkUrl = MyCommFun.ObjToStr(dr["link_url"]); if (linkUrl.Length > 0) { //外链地址 dr["link_url"] = "<span class=\"lianjie_wai\">[外]</span>" + " <a href=\"javascript:;\">" + linkUrl + "</a>"; } else { dr["link_url"] = "<span class=\"lianjie_ben\">[本]</span>" + " <a href=\"javascript:;\">" + MyCommFun.getWebSite() + "/content.aspx?wid=" + MyCommFun.ObjToStr(dr["wid"]) + "&aid=" + dr["id"].ToString() + "</a>"; // dr["link_url"] = "<span class=\"lianjie_ben\">[本]</span>" + " <a href=\"javascript:;\">" + MyCommFun.getWebSite() + "/detail.aspx?wid=" + MyCommFun.ObjToStr(dr["wid"]) + "&aid=" + dr["id"] + "</a>"; } } ds.AcceptChanges(); } this.rptList1.DataSource = ds; this.rptList1.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("wx_article_page_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}&page={4}", _channel_id.ToString(), _category_id.ToString(), this.keywords, this.property, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
/// <summary> /// hidStatus:-2,隐藏中奖卡,弹出错误信息; /// -1,直接跳转到结束页面; /// 2,中奖了,显示中奖卡; /// 3,中奖的最终结果展示;中奖卡隐藏; /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { OnlyWeiXinLook(); if (!IsPostBack) { int aid = MyCommFun.RequestInt("aid", 0); int wid = MyCommFun.RequestInt("wid", 0); string openid = MyCommFun.RequestOpenid(); if (aid == 0 || wid == 0 || openid.Trim() == "") { hidStatus.Value = "-2"; hidErrInfo.Value = "访问的参数有问题"; return; } bindData(aid, openid); } }
private void ShowInfo(int id) { Model.wx_userweixin model = bll.GetModel(id); this.id = model.id; this.txtwxName.Text = model.wxName; this.txtwxId.Text = model.wxId; this.txtweixinCode.Text = model.weixinCode; this.txtImgUrl.Text = model.headerpic; //this.txtapiurl.Text = model.apiurl; this.txtwxToken.Text = model.wxToken; this.txtAppId.Text = model.AppId; this.txtAppSecret.Text = model.AppSecret; txtapiurl.Text = MyCommFun.getWebSite() + "/api/weixin/api.aspx?apiid=" + model.id; }
protected void Page_Load(object sender, EventArgs e) { OnlyWeiXinLook(); if (!IsPostBack) { int aid = MyCommFun.RequestInt("aid", 0); if (aid == 0) { return; } BLL.wx_sTicket actbll = new BLL.wx_sTicket(); Model.wx_sTicket sstAction = actbll.GetModel(aid); if (sstAction != null) { imgEnd.ImageUrl = sstAction.endPic == null ? "images/end.jpg" : sstAction.endPic.ToString(); } } }
private bool DoAdd() { Model.wx_userweixin weixin = GetWeiXinCode(); Model.wx_fc_album model = new Model.wx_fc_album(); bool result = false; model.aid = MyCommFun.Str2Int(this.ddlAlbums.SelectedItem.Value); model.wid = weixin.id; model.createDate = DateTime.Now; model.fid = fid; if (bll.Add(model) > 0) { AddAdminLog(MXEnums.ActionEnum.Add.ToString(), "添加相册信息:" + model.fid); //记录日志 result = true; } return(result); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { aid = MyCommFun.RequestInt("aid"); shopid = MyCommFun.RequestInt("shopid"); openid = MyCommFun.QueryString("openid"); shopid = MyCommFun.RequestInt("shopid"); shopinfo = shopBll.GetModel(shopid); hotelName = shopinfo.hotelName; if (openid != "") { List(openid); } } }
private void RptBind(string _strWhere, string _orderby) { int aid = MyCommFun.RequestInt("id"); _strWhere = "actid=" + aid + " " + _strWhere; this.page = MXRequest.GetQueryInt("page", 1); txtKeywords.Text = this.keywords; DataSet ds = ubll.GetList(this.pageSize, this.page, _strWhere, _orderby, out this.totalCount); this.rptList.DataSource = ds; this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("ggkAwardUser.aspx?id=" + MyCommFun.RequestInt("id"), "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
//保存 protected void btnSubmit_Click(object sender, EventArgs e) { if (!DoEdit()) { JscriptMsg("保存过程中发生错误!", "", "Error"); return; } //如果是从微用户管理里来的,还得判断下 if (MyCommFun.QueryString("fpage").Trim().Length > 0 && MyCommFun.RequestInt("uid") > 0) { returnPage = "weixin_list.aspx?id=" + MyCommFun.RequestInt("uid"); JscriptMsg("修改微信公众帐号信息成功!", returnPage, "Success"); } else { JscriptMsg("修改微信公众帐号信息成功!", "wxcodemgr.aspx", "Success"); } }
protected void Page_Load(object sender, EventArgs e) { OnlyWeiXinLook(); if (!IsPostBack) { int aid = MyCommFun.RequestInt("aid", 0); int wid = MyCommFun.RequestInt("wid", 0); string openid = MyCommFun.RequestOpenid(); if (aid == 0 || wid == 0 || openid.Trim() == "" | openid.Trim() == "loseopenid") { errorInfo = "访问的参数有问题!"; ggkAction = null; return; } bindData(aid, openid); } }
/// <summary> /// 2014-9-18新增抽奖功能 /// </summary> /// <param name="openid"></param> /// <returns></returns> public string GetTxtContent(string openid) { int ret = 0; SqlParameter[] parameters = { new SqlParameter("@open_id", SqlDbType.VarChar,50), new SqlParameter("@id",SqlDbType.Int,4), }; parameters[0].Value = openid; parameters[1].Value = 0; parameters[1].Direction = ParameterDirection.Output; SqlDataReader sr = DbHelperSQL.RunProcedure("[saveOpenid_queryName]", parameters); sr.Close(); ret = MyCommFun.Obj2Int(parameters[1].Value); return ret.ToString(); }
private bool DoEdit(int _id) { Model.wx_userweixin weixin = GetWeiXinCode(); Model.wx_wq_wzlx model = bll.GetModel(_id); bool result = false; model.yhid = MyCommFun.Str2Int(this.ddlZxyh.SelectedItem.Value); model.lbsid = MyCommFun.Str2Int(this.ddlLbs.SelectedItem.Value); model.pxcid = MyCommFun.Str2Int(this.ddlPpxc.SelectedItem.Value); model.escid = MyCommFun.Str2Int(this.ddlEsc.SelectedItem.Value); model.cxid = MyCommFun.Str2Int(this.ddlZxcx.SelectedItem.Value); if (bll.Update(model)) { AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "修改汽车文章类型id:" + model.Id); //记录日志 result = true; } return(result); }
protected void Page_Load(object sender, EventArgs e) { hotelid = MyCommFun.RequestInt("hotelid"); roomid = MyCommFun.RequestInt("roomid"); action = MyCommFun.QueryString("action"); if (!IsPostBack) { SetLocation(); SetControl(); if (action == MXEnums.ActionEnum.Edit.ToString() || action == MXEnums.ActionEnum.Audit.ToString() || action == MXEnums.ActionEnum.View.ToString()) { ShowInfo(roomid); } } }
private void RptBind(string _strWhere, string _orderby) { Model.wx_userweixin weixin = GetWeiXinCode(); _strWhere = "wId=" + weixin.id + " " + _strWhere; this.page = MXRequest.GetQueryInt("page", 1); txtKeywords.Text = this.keywords; DataSet ds = tbll.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; DateTime begin = new DateTime(); DateTime end = new DateTime(); int count = ds.Tables[0].Rows.Count; for (int i = 0; i < count; i++) { dr = ds.Tables[0].Rows[i]; begin = MyCommFun.Obj2DateTime(dr["beginDate"]); end = MyCommFun.Obj2DateTime(dr["endDate"]); if (begin > DateTime.Now) { dr["status_s"] = "<span class=\"act_before\">未开始</span>"; } else if (end <= DateTime.Now) { dr["status_s"] = "<span class=\"act_end\">已结束</span>"; } else { dr["status_s"] = "<span class=\"act_in\">进行中</span>"; } dr["url"] = MyCommFun.getWebSite() + "/weixin/sticket/index.aspx?wid=" + dr["wid"].ToString() + "&aid=" + dr["id"].ToString(); } ds.AcceptChanges(); } this.rptList.DataSource = ds; this.rptList.DataBind(); //绑定页码 txtPageNum.Text = this.pageSize.ToString(); string pageUrl = Utils.CombUrlTxt("simpleTList.aspx", "keywords={0}&page={1}", this.keywords, "__id__"); PageContent.InnerHtml = Utils.OutPageList(this.pageSize, this.page, this.totalCount, pageUrl, 8); }
/// <summary> /// 新增时候,优惠券立即发放(后台不需要做,在微信用户进去优惠券时候再取数据) /// </summary> /// <param name="userType"></param> private void AddPersonYqh(int userType) { BLL.wx_ucard_users userBll = new wx_ucard_users(); IList<Model.wx_ucard_users> userlist = new List<Model.wx_ucard_users>(); if (userType == 0) { //全部人员 userlist = userBll.GetModelList("sid=" + sid); } else if (userType > 0 && userType < 1000) { //按照等级来取人员 BLL.wx_ucard_udegree degreeBll = new wx_ucard_udegree(); IList<Model.wx_ucard_udegree> degreelist = degreeBll.GetModelList("degreeNum=" + userType+" and sid="+sid); if (degreelist == null || degreelist.Count <= 0) { return; } Model.wx_ucard_udegree degree = degreelist[0]; userlist = userBll.GetModelList("ttScore<=" + degree.score_max + " and ttScore>=" + degree.score_min+" and sid="+sid); } else if (userType > 1000 && userType < 2000) { //按照开卡和消费情况来取人员 } else if (userType > 2000) { //按照消费情况来取人员 BLL.wx_ucard_users_consumeinfo cBll = new wx_ucard_users_consumeinfo(); IList<Model.wx_ucard_users_consumeinfo> conlist = new List<Model.wx_ucard_users_consumeinfo>(); if (userType == 2001) { //单次消费超过x元 float dcje = MyCommFun.Str2Float(txtdcje.Text); userlist = userBll.GetModelList("sid=" + sid + " and id in (select distinct uid from wx_ucard_users_consumeinfo where sId=" + sid + " and consumeMoney>=" + dcje + ")"); } else if (userType == 2002) { //累计消费超过x元 float ljje = MyCommFun.Str2Float(txtljje.Text); userlist = userBll.GetModelList("sid=" + sid + " and id in (select uid from wx_ucard_users_consumeinfo group by uid having sum(consumeMoney)>" + ljje + ")"); } } }