代码修改后的版本,全部提交
This commit is contained in:
81
Mtxfw.shop/Member_Index.aspx.cs
Normal file
81
Mtxfw.shop/Member_Index.aspx.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Text;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
namespace Mtxfw.shop
|
||||
{
|
||||
public partial class Member_Index : Mtxfw.Utility.MemberBase
|
||||
{
|
||||
public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
|
||||
public Mtxfw.DAL.user_Results daoResults = new Mtxfw.DAL.user_Results();
|
||||
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config();
|
||||
public Mtxfw.DAL.Article daoArt = new Mtxfw.DAL.Article();
|
||||
Mtxfw.DAL.order_info daoorder = new Mtxfw.DAL.order_info();
|
||||
protected String strmoney, MemberLevel = "", Membermoney12 = "0", Membermoney14 = "0", Membermoney17 = "0", Membermoney19 = "0", mydd = "0", mydd2 = "0", mydd3 = "0";
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Page.Title = "管理首页 - " + config.webName;
|
||||
//string dls = daoResults.GetCount("b0", "utype=6 And MemberId=" + Card + " And Convert(VarChar(50),conent)='积分兑换大唐币' And DateDiff(day,addtime,getdate())<>0").ToString();
|
||||
//string dls2 = daoResults.GetCount("b0", "utype=6 And MemberId=" + Card + " And Convert(VarChar(50),conent)='积分兑换大唐币' And DateDiff(day,addtime,getdate())=0").ToString();
|
||||
//Response.Write(dls + "|" + dls2);
|
||||
Data_Bind();
|
||||
|
||||
Mtxfw.Model.user_info model = daoUser.GetModel(Card);
|
||||
if (model != null)
|
||||
{
|
||||
MemberLevel = "";
|
||||
if (model.uLevel == 1)
|
||||
{
|
||||
MemberLevel = "注册会员";
|
||||
}
|
||||
|
||||
|
||||
Membermoney12 = model.umoney12.ToString("f2");
|
||||
Membermoney14 = model.umoney14.ToString("f2");
|
||||
Membermoney17 = model.umoney17.ToString("f2");
|
||||
Membermoney19 = model.umoney19.ToString();
|
||||
|
||||
Membermoney12 = "电子币余额:<font color='red'>" + Membermoney12 + "</font>";
|
||||
if (model.IFStores == 1)
|
||||
{
|
||||
Membermoney12 += " 货款余额:<font color='red'>" + Membermoney17 + "</font>";
|
||||
}
|
||||
if (model.IFStores == 1)
|
||||
{
|
||||
Membermoney12 += " 享受折扣价格:<font color='red'>" + Membermoney19 + "折</font>";
|
||||
}
|
||||
mydd = new Mtxfw.DAL.order_info().GetCount("utype=1 And UserID=" + Card + "").ToString();
|
||||
mydd2 = new Mtxfw.DAL.order_info().GetCount("utype=1 And UserID=" + Card + " And O_Payed=0").ToString();
|
||||
mydd3 = new Mtxfw.DAL.order_info().GetCount("utype=2 And UserID=" + Card + " And O_Payed=1").ToString();
|
||||
|
||||
}
|
||||
}
|
||||
MyPager.PageChanged += delegate(object s, EventArgs ex)
|
||||
{
|
||||
Data_Bind();
|
||||
};
|
||||
MyPager2.PageChanged += delegate(object s, EventArgs ex)
|
||||
{
|
||||
Data_Bind();
|
||||
};
|
||||
}
|
||||
protected void Data_Bind()
|
||||
{
|
||||
MyPager.PageSize = 10;
|
||||
MyPager.RecordCount = daoArt.GetCount("ParentID=9 Or ParentID=11");
|
||||
Mtxfw.Utility.Tools.ToBind(Repeater1, daoArt.GetPager(MyPager, "", "ParentID=9 Or ParentID=11 Order by AddTime desc"));
|
||||
|
||||
MyPager2.PageSize = 10;
|
||||
MyPager2.RecordCount = daoArt.GetCount("ParentID=10");
|
||||
Mtxfw.Utility.Tools.ToBind(Repeater2, daoArt.GetPager(MyPager2, "", "ParentID=10 Order by AddTime desc"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user