Files
g.hnyhua.cn/Mtxfw.VipSite/Admin_Member_ZZJFJG.aspx.cs

80 lines
3.4 KiB
C#
Raw Permalink Normal View History

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
namespace Mtxfw.VipSite
{
public partial class Admin_Member_ZZJFJG : Mtxfw.Utility.MemberBase
{
Mtxfw.DAL.user_Results_jl2 daojl2 = new Mtxfw.DAL.user_Results_jl2();
Mtxfw.DAL.user_Results_jl3 daojl3 = new Mtxfw.DAL.user_Results_jl3();
Mtxfw.DAL.user_jjfp daojjfp = new Mtxfw.DAL.user_jjfp();
Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
Mtxfw.DAL.user_Results daoResults = new Mtxfw.DAL.user_Results();
DAL.user_zzjf daozzjf = new DAL.user_zzjf();
DAL.user_zzjf_log daozzjflog = new DAL.user_zzjf_log();
protected string FHQCount = "0", FHQCount0 = "0", JQFHCount = "0";
public int gtype = 0;
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
string hostname = Request.Url.Host;
if (!IsPostBack)
{
if (Session["IFPassword"] == null)
{
Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_ZZJFJG.aspx");
}
if (IFStores != 1)
{
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
}
if (MemberJS.IndexOf("增值积分价格") == -1)
{
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
}
Page.Title = "增值积分价格 - " + GetWebName;
DataSet ds= daozzjf.GetList("", "gtype=" + gtype + "");
if (ds.Tables[0].Rows.Count > 0)
{
FHQCount = Convert.ToDouble(ds.Tables[0].Rows[0]["zznum"]).ToString();
FHQCount0 = Convert.ToDouble(ds.Tables[0].Rows[0]["zzjf"]).ToString();
}
ds.Clear();
Data_Bind();
}
MyPager.PageChanged += delegate(object s, EventArgs ex)
{
Data_Bind();
};
}
protected void Data_Bind()
{
System.Text.StringBuilder sb = new System.Text.StringBuilder();
String SJ = Request.QueryString["SJ"];
String SJ2 = Request.QueryString["SJ2"];
if (!String.IsNullOrEmpty(SJ) && !String.IsNullOrEmpty(SJ2))
{
sb.Append("and (addtime between '" + SJ + " 00:00:00' and '" + SJ2 + " 23:59:59')");
//sb.Append("and (CONVERT(varchar(100),DATEADD(mm,DATEDIFF(mm,0,dateadd(month,-1,addtime)),0),120)>=CONVERT(varchar(100),cast('" + SJ + " 00:00:00' as datetime),120) And CONVERT(varchar(100),dateadd(ms,-3,DATEADD(mm,DATEDIFF(m,0,dateadd(month,-1,addtime))+1,0)),120)<=CONVERT(varchar(100),cast('" + SJ2 + " 23:59:59' as datetime),120))");
}
string strOrder = " Order By addtime desc,id desc";
MyPager.PageSize = 100;
MyPager.RecordCount = daozzjflog.GetCount("gtype=" + gtype + "" + sb.ToString());
Mtxfw.Utility.Tools.ToBind(Repeater1, daozzjflog.GetPager(MyPager, "", "gtype=" + gtype + "" + sb.ToString() + strOrder));
}
}
}