Files
g.hnyhua.cn/Mtxfw.VipSite/Member_Index.aspx.cs
2026-02-07 15:48:27 +08:00

115 lines
6.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Globalization;
using System.Data;
namespace Mtxfw.VipSite
{
public partial class Member_Index : 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_Results daoResults = new Mtxfw.DAL.user_Results();
public Mtxfw.DAL.user_Results_jl2 daojl2 = new Mtxfw.DAL.user_Results_jl2();
public Mtxfw.DAL.Article daoArt = new Mtxfw.DAL.Article();
public Mtxfw.DAL.user_Goods daoGoods = new Mtxfw.DAL.user_Goods();
public Mtxfw.DAL.User_CZ_log daolog = new Mtxfw.DAL.User_CZ_log();
public Mtxfw.DAL.User_OnLine daoOnLine = new Mtxfw.DAL.User_OnLine();
public Mtxfw.DAL.order_info daoorder = new Mtxfw.DAL.order_info();
DAL.user_jjfp daojjfp = new DAL.user_jjfp();
protected String strmoney = "0", strggs = "", strTitle = "", strBody = "", strPic1 = "", strPic2 = "", Zcount="0", aZcount = "0", bZcount = "0", Zcount0 = "0", Zcount1 = "0", Zcount2 = "0", Zcount3 = "0", Zcount4 = "0", Zcount5 = "0", zmcount = "0", zmcount0="";
public int uLevel7 = 0, count1 = 0, count2=0;
public int gtype = 0;
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
string hostname = Request.Url.Host;
if (IFStores == 0 && MemberuLevel16 != 2)
{
Response.Redirect("/");
}
DateTime dt = DateTime.Now;
string mindt = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00";
string maxdt = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd") + " 00:00:00";
Zcount = daoUser.GetCount("gtype=" + gtype + " and UserState='正常' And IFStores=0").ToString();
aZcount = daoUser.GetCount("gtype=" + gtype + " and UserState='正常' And IFStores=0 and uLevel14=0").ToString();
bZcount = daoUser.GetCount("gtype=" + gtype + " and UserState='正常' And IFStores=0 and uLevel14=1").ToString();
string strSQL = " and ttype=1";
if (MemberuLevel29 == 0)
{
//strSQL = " And MemberId=" + MemberShippingID;
//}
Zcount0 = daoorder.GetCount("gtype=" + gtype + " and IFDelete=0" + strSQL).ToString();
Zcount1 = daoorder.GetCount("gtype=" + gtype + " and IFDelete=0" + strSQL + " and DateDiff(day,addtime,getdate())=0").ToString();
Zcount2 = daoorder.GetCount("gtype=" + gtype + " and IFDelete=0" + strSQL + " and DateDiff(day,addtime,getdate())=1").ToString();
}
//Zcount0 = daoResults.GetCount("gtype=" + gtype + " and utype=12 and IFDelete=0 and b2=1 And b7=0").ToString();
//Zcount1 = daoResults.GetCount("gtype=" + gtype + " and utype=12 and IFDelete=0 and b2=1 And b7=1").ToString();
//Zcount2 = daoResults.GetCount("gtype=" + gtype + " and utype=12 and IFDelete=0 and b2=1 And b7=4").ToString();
//Zcount3 = daoResults.GetCount("gtype=" + gtype + " and utype=12 and IFDelete=0 and b8=1 and b16=0").ToString();
//Zcount4 = daoResults.GetCount("gtype=" + gtype + " and utype=12 and IFDelete=0 and b8=1 and b11=0 and b16=1").ToString();
//Zcount5 = daoResults.GetCount("gtype=" + gtype + " and utype=12 and IFDelete=0 and b8=1 and seef=3").ToString();
/*string strzd = daojjfp.Getzd("count1", "gtype=" + gtype + " and TType=0").ToString();
if (strzd != "")
{
zmcount = Convert.ToDouble(strzd).ToString();
}
strzd = daojjfp.Getzd("count2", "gtype=" + gtype + " and TType=0").ToString();
if (strzd != "")
{
zmcount0 = Convert.ToDouble(strzd).ToString();
}*/
Mtxfw.Model.user_info umodel = daoUser.GetModel(Card);
if (umodel != null)
{
if (!IsPostBack)
{
Data_Bind();
Page.Title = "管理首页 - " + config.webName;
}
/*ds = daoGoods.GetList("", "utype='3' Order By AddTime Desc");
if (ds.Tables[0].Rows.Count > 0)
{
int i = 0;
foreach (System.Data.DataRow Dr in ds.Tables[0].Rows)
{
if (i == 0)
{
if (Dr["GoodsPic"].ToString() != "")
{
strPic1 = Mtxfw.Utility.Common.GetCoverPic(Dr["GoodsPic"].ToString(), "235x360", "cut");
}
}
else
{
if (Dr["GoodsPic"].ToString() != "")
{
strPic2 = Mtxfw.Utility.Common.GetCoverPic(Dr["GoodsPic"].ToString(), "235x360", "cut");
}
}
i += 1;
}
}
ds.Clear();*/
}
}
protected void Data_Bind()
{
//Mtxfw.Utility.Tools.ToBind(Repeater1, daoArt.GetList("top 10", "gtype=" + gtype + " and ParentID=17 And CategoryId='1' And Seef=0 Order by AddTime desc"));
//Mtxfw.Utility.Tools.ToBind(Repeater2, daoArt.GetList("top 10", "gtype=" + gtype + " and ParentID=17 And CategoryId='0' And Seef=0 Order by AddTime desc"));
//Mtxfw.Utility.Tools.ToBind(Repeater3, daoUser.GetList("top 10 (Select count(b.id) from user_info b where b.IFStores=0 and (b.uLevel7=1 Or b.uLevel14=1) And b.uLevel2=0 And b.ContactID=a.id) as ztjcount,(Select count(b.id) from user_info b where b.IFStores=0 and (b.uLevel7=1 Or b.uLevel14=1) And b.uLevel2=0 And b.ContactID=a.id and DateDiff(week,b.regtime,getdate())=0) as ztjcount2,", "gtype=" + gtype + " and IFStores=0 and (uLevel7=1 Or uLevel14=1) Order by (Select count(b.id) from user_info b where b.IFStores=0 and (b.uLevel7=1 Or b.uLevel14=1) And b.uLevel2=0 And b.ContactID=a.id and DateDiff(week,b.regtime,getdate())=0) desc"));
//Mtxfw.Utility.Tools.ToBind(Repeater4, daolog.GetList("top 10", "MemberId=" + Card + " Order by AddTime desc"));
}
}
}