using System; using System.Data; using System.Configuration; using System.Web; using System.Net; using System.IO; using System.Security.Cryptography; using System.Xml; using System.Collections.Specialized; using System.Text.RegularExpressions; using System.Collections.Generic; using System.Text; using System.Globalization; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using Newtonsoft.Json; namespace Mtxfw.shop { public partial class choujiang_qj : Mtxfw.Utility.MemberBase { /// /// 填写你申请的登录资料 /// public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config(); public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info(); public Mtxfw.DAL.User_xjcjq daocjq = new Mtxfw.DAL.User_xjcjq(); public Mtxfw.DAL.User_zhongjiang daozj = new Mtxfw.DAL.User_zhongjiang(); public int CJQCount = 0, KCJCount = 0, KYCJQCount = 0, JRCJCount = 0, JRCJQCount = 0; public int utype = 0; public string ZJJE = "0"; protected override void OnLoad(EventArgs e) { base.OnLoad(e); if (!IsPostBack) { Page.Title = "在线抽奖 - " + config.webName; Page.MetaDescription = "在线抽奖 - " + config.webName; Page.MetaKeywords = "在线抽奖," + config.webName; } String pool=Request.QueryString["pool"]; if (!String.IsNullOrEmpty(pool)) { Mtxfw.Model.user_info umodel = daoUser.GetModel(Card); if (umodel != null) { if (umodel.Phone.Trim() == "") { ClientScript.RegisterStartupScript(this.GetType(), "", ""); } else { if (!System.Text.RegularExpressions.Regex.IsMatch(umodel.Phone.Trim(), @"^[1]+[3,4,5,8]+\d{9}")) { ClientScript.RegisterStartupScript(this.GetType(), "", ""); } } if (pool == "jifei") { utype = 1; } if (utype == 0) { CJQCount = daocjq.GetCount("utype=" + utype + " And MemberId=" + Card + " And Seef=1"); KYCJQCount = daocjq.GetCount("utype=" + utype + " And MemberId=" + Card + " And (kqjcs-yqjcs)>0 And Seef=1"); JRCJQCount = daocjq.GetCount("utype=" + utype + " And MemberId=" + Card + " And (kqjcs-yqjcs)>0 And Seef=1 And (Select Count(Id) From User_zhongjiang b where b.utype=a.utype and b.MemberId=a.MemberId And b.cjqId=a.id And DateDiff(day,addtime,getdate())=0)=0"); } else { CJQCount = Convert.ToInt32((umodel.umoney30 - umodel.umoney31).ToString().Split('.')[0]); string strxfje = new DAL.choujiang().Getzd("xfje", "utype=" + utype).ToString(); Double xfje = 0; if (strxfje != "") { xfje = Convert.ToDouble(strxfje); } KYCJQCount = int.Parse((CJQCount / xfje).ToString().Split('.')[0].Replace(",", "")); } JRCJCount = daozj.GetCount("utype=" + utype + " And MemberId=" + Card + " And DateDiff(day,addtime,getdate())=0"); ZJJE = daozj.Getzd("sum(zjje) as zjje", "utype=" + utype + " And MemberId=" + Card).ToString(); if (ZJJE == "") { ZJJE = "0"; } ZJJE = Convert.ToDouble(ZJJE).ToString("f0"); } } } } }