95 lines
4.3 KiB
C#
95 lines
4.3 KiB
C#
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_FHGL : 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();
|
|
protected string FHQCount = "0", QYZCount = "0", QYZCount0 = "0", FHQCount0 = "0", FHQCount1 = "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_FHGL.aspx");
|
|
}
|
|
if (IFStores != 1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
if (MemberJS.IndexOf("分红结算") == -1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
Page.Title = "分红结算 - " + GetWebName;
|
|
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";
|
|
string mindt0 = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd") + " 00:00:00";
|
|
string maxdt0 = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00";
|
|
string strYJ = daoUser.Getzd("sum(umoney48)", "gtype=" + gtype + " and UserState='正常' And IFStores=0 and uLevel46=0").ToString();
|
|
if (strYJ != "")
|
|
{
|
|
QYZCount = Convert.ToDouble(strYJ).ToString();
|
|
}
|
|
strYJ = daoUser.Getzd("sum(umoney48)", "gtype=" + gtype + " and UserState='正常' And IFStores=0 and uLevel46=1").ToString();
|
|
if (strYJ != "")
|
|
{
|
|
QYZCount0 = Convert.ToDouble(strYJ).ToString();
|
|
}
|
|
DataSet ds= new DAL.user_jjfp().GetList("", "gtype=" + gtype + " and TType=0");
|
|
|
|
if (ds.Tables[0].Rows.Count > 0)
|
|
{
|
|
FHQCount = Convert.ToDouble(ds.Tables[0].Rows[0]["count1"]).ToString();
|
|
FHQCount0 = Convert.ToDouble(ds.Tables[0].Rows[0]["count2"]).ToString();
|
|
FHQCount1 = Convert.ToDouble(ds.Tables[0].Rows[0]["count4"]).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";
|
|
MyPager.PageSize = 100;
|
|
MyPager.RecordCount = daojjfp.GetCount("gtype=" + gtype + " and TType=1" + sb.ToString());
|
|
Mtxfw.Utility.Tools.ToBind(Repeater1, daojjfp.GetPager(MyPager, "", "gtype=" + gtype + " and TType=1" + sb.ToString() + strOrder));
|
|
|
|
}
|
|
|
|
}
|
|
} |