首次推送
This commit is contained in:
163
Mtxfw.VipSite/Admin_Member_List_YJCS.aspx.cs
Normal file
163
Mtxfw.VipSite/Admin_Member_List_YJCS.aspx.cs
Normal file
@@ -0,0 +1,163 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
namespace Mtxfw.VipSite
|
||||
{
|
||||
public partial class Admin_Member_List_YJCS : Mtxfw.Utility.MemberBase
|
||||
{
|
||||
Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
|
||||
Mtxfw.DAL.user_Results daoResults = new Mtxfw.DAL.user_Results();
|
||||
private static Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
|
||||
Mtxfw.DAL.user_proxy daoproxy = new Mtxfw.DAL.user_proxy();
|
||||
Mtxfw.DAL.duihuanma daodhm = new Mtxfw.DAL.duihuanma();
|
||||
protected int IFShowXFJF = 0;
|
||||
protected string strIFKD = "", strIFNoKD = "";
|
||||
public int gtype = 0;
|
||||
#region 判断页面是否刷新
|
||||
private bool _refreshState;
|
||||
private bool _isRefresh;
|
||||
|
||||
/// <summary>
|
||||
/// 判断页面是否刷新
|
||||
/// </summary>
|
||||
public bool IsRefresh
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isRefresh;
|
||||
}
|
||||
}
|
||||
protected override void LoadViewState(object savedState)
|
||||
{
|
||||
object[] allStates = (object[])savedState;
|
||||
base.LoadViewState(allStates[0]);
|
||||
_refreshState = (bool)allStates[1];
|
||||
_isRefresh = _refreshState == (bool)Session["__ISREFRESH"];
|
||||
}
|
||||
protected override object SaveViewState()
|
||||
{
|
||||
Session["__ISREFRESH"] = _refreshState;
|
||||
object[] allStates = new object[2];
|
||||
allStates[0] = base.SaveViewState();
|
||||
allStates[1] = !_refreshState;
|
||||
return allStates;
|
||||
}
|
||||
#endregion
|
||||
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_List_YJCS.aspx");
|
||||
}
|
||||
if (IFStores != 1)
|
||||
{
|
||||
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
||||
}
|
||||
if (MemberJS.IndexOf("业绩查询") == -1)
|
||||
{
|
||||
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
||||
}
|
||||
|
||||
Data_Bind();
|
||||
Page.Title = "业绩查询 - " + GetWebName;
|
||||
}
|
||||
|
||||
MyPager.PageChanged += delegate(object s, EventArgs ex)
|
||||
{
|
||||
Data_Bind();
|
||||
};
|
||||
}
|
||||
|
||||
protected void Data_Bind()
|
||||
{
|
||||
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
||||
String key = HttpUtility.UrlDecode(Request.QueryString["key"]);
|
||||
String order = HttpUtility.UrlDecode(Request.QueryString["Order"]);
|
||||
string SJ = "", SJ2 = "";
|
||||
if (!String.IsNullOrEmpty(Request.QueryString["SJ"]))
|
||||
{
|
||||
SJ = Request.QueryString["SJ"].ToString();
|
||||
}
|
||||
if (!String.IsNullOrEmpty(Request.QueryString["SJ2"]))
|
||||
{
|
||||
SJ2 = Request.QueryString["SJ2"].ToString();
|
||||
}
|
||||
String strOrder = " umoney18 desc";
|
||||
if (!String.IsNullOrEmpty(order))
|
||||
{
|
||||
if (order=="1")
|
||||
{
|
||||
strOrder = " umoney19 desc";
|
||||
}
|
||||
}
|
||||
string filsql = ",umoney18 as zyj,umoney19 as zyj0";
|
||||
sb.Append("gtype=" + gtype + " and utype='0' And userstate<>'未审核' And IFStores=0 and uLevel18=0 And Phone<>''");
|
||||
if (gtype == 0)
|
||||
{
|
||||
if (Memberttype != -1)
|
||||
{
|
||||
sb.Append(" And gtype=" + Memberttype);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(" And gtype=" + gtype);
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(key))
|
||||
{
|
||||
key = key.Trim();
|
||||
sb.Append(" and (UserName like '%" + key + "%' or realname like '%" + key + "%')");
|
||||
}
|
||||
if (SJ != "" && SJ2 != "")
|
||||
{
|
||||
filsql = ",(Select sum(b.Addmoney) From user_Results_jl2 b where gtype=" + gtype + " and b.utype=8 and b.utype2=0 and b.IFDelete=0 and (b.addtime between '" + SJ + " 00:00:00' and '" + SJ2 + " 23:59:59') And b.MemberId=tbl.id) as zyj,(Select sum(b.Addmoney) From user_Results_jl2 b where gtype=" + gtype + " and b.utype=8 and b.utype2=1 and b.IFDelete=0 and (b.addtime between '" + SJ + " 00:00:00' and '" + SJ2 + " 23:59:59') And b.MemberId=tbl.id) as zyj0";
|
||||
strOrder = " (Select sum(b.Addmoney) From user_Results_jl2 b where gtype=" + gtype + " and b.utype=8 and b.utype2=0 and b.IFDelete=0 and (b.addtime between '" + SJ + " 00:00:00' and '" + SJ2 + " 23:59:59') And b.MemberId=tbl.id) desc";
|
||||
if (!String.IsNullOrEmpty(order))
|
||||
{
|
||||
if (order == "1")
|
||||
{
|
||||
strOrder = " (Select sum(b.Addmoney) From user_Results_jl2 b where gtype=" + gtype + " and b.utype=8 and b.utype2=1 and b.IFDelete=0 and (b.addtime between '" + SJ + " 00:00:00' and '" + SJ2 + " 23:59:59') And b.MemberId=tbl.id) desc";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
string groupby = "";
|
||||
|
||||
int Start = 0;
|
||||
int Limit = 0;
|
||||
Int32 Recount = 0;
|
||||
MyPager.PageSize = 100;
|
||||
Start = MyPager.PageSize * (MyPager.CurrentPageIndex - 1);
|
||||
Limit = MyPager.PageSize;
|
||||
DataSet dss = daoUser.GetDataSet(groupby, strOrder, "ID,UserName,RealName"+ filsql, "", sb.ToString(), Start, Limit, out Recount);
|
||||
Mtxfw.Utility.Tools.ToBind(Repeater1, dss.Tables[1]);
|
||||
MyPager.RecordCount = Recount;
|
||||
if (MyPager.RecordCount == 0)
|
||||
{
|
||||
MyPager.Visible = false;
|
||||
}
|
||||
string strzye = daoUser.Getzd("(sum(umoney)-sum(umoney17)) as umoney", sb.ToString()).ToString();
|
||||
if (strzye != "")
|
||||
{
|
||||
Label_b1.Text = Convert.ToDouble(strzye).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
Label_b1.Text = "0";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user