166 lines
5.8 KiB
C#
166 lines
5.8 KiB
C#
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_JJXF2 : Mtxfw.Utility.MemberBase
|
|
{
|
|
Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
|
|
Mtxfw.DAL.user_Results daoResults = new Mtxfw.DAL.user_Results();
|
|
Mtxfw.DAL.user_Results_jl2 daojl2 = new Mtxfw.DAL.user_Results_jl2();
|
|
Mtxfw.DAL.user_Results_jl4 daojl4 = new Mtxfw.DAL.user_Results_jl4();
|
|
protected Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
|
|
protected int IFShowXFJF = 0,Countr=0;
|
|
protected string strIFKD = "", strIFNoKD = "";
|
|
protected Double zyj = 0, xfje = 0, zjj = 0, bcbl = 0, zzyj = 0, zje=0;
|
|
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;
|
|
|
|
string stryj = daoResults.Getzd("sum(b1)", "gtype=" + gtype + " and utype=0 And IFDelete=0").ToString();
|
|
if (stryj != "")
|
|
{
|
|
zjj = Convert.ToDouble(stryj);
|
|
}
|
|
stryj = daojl2.Getzd("sum(Addmoney)", "gtype=" + gtype + " and utype=3 and utype2=0 And Convert(varchar(50),BZContent)='注册币' And IFDelete=0").ToString();
|
|
if (stryj != "")
|
|
{
|
|
zzyj = Convert.ToDouble(stryj);
|
|
}
|
|
DataSet ds = daoUser.GetList1("id,umoney39", "gtype=" + gtype + " and uutype='0' And userstate<>'未审核' And IFStores=0 And gtype=" + gtype + " And uLevel3=2");
|
|
if (ds.Tables[0].Rows.Count > 0)
|
|
{
|
|
foreach (System.Data.DataRow Dr in ds.Tables[0].Rows)
|
|
{
|
|
int dID = int.Parse(Dr["id"].ToString());
|
|
Double umoney39 = Convert.ToDouble(Convert.ToDouble(Dr["umoney39"]).ToString("f2"));
|
|
zyj += umoney39;
|
|
if (umoney39 >= 500000.00)
|
|
{
|
|
xfje += Convert.ToDouble(config.webMoney34);
|
|
}
|
|
else
|
|
{
|
|
if (umoney39 >= 300000.00)
|
|
{
|
|
xfje += Convert.ToDouble(config.webMoney33);
|
|
}
|
|
else
|
|
{
|
|
if (umoney39 >= 200000.00)
|
|
{
|
|
xfje += Convert.ToDouble(config.webMoney32);
|
|
}
|
|
else
|
|
{
|
|
if (umoney39 >= 100000.00)
|
|
{
|
|
xfje += Convert.ToDouble(config.webMoney31);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
ds.Clear();
|
|
bcbl = ((xfje + zjj) / zzyj)*100;
|
|
if (!IsPostBack)
|
|
{
|
|
if (Session["IFPassword"] == null)
|
|
{
|
|
Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_List.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;
|
|
}
|
|
|
|
|
|
}
|
|
|
|
protected void Data_Bind()
|
|
{
|
|
|
|
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
|
String key = HttpUtility.UrlDecode(Request.QueryString["key"]);
|
|
|
|
sb.Append("gtype=" + gtype + " and utype=11");
|
|
if (gtype == 0)
|
|
{
|
|
if (Memberttype != -1)
|
|
{
|
|
sb.Append(" And gtype=" + Memberttype);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
sb.Append(" And gtype=" + gtype);
|
|
}
|
|
|
|
|
|
|
|
string strOrder = " Order By addtime Desc";
|
|
zzyj = 0;
|
|
DataSet ds = daojl4.GetList("", sb.ToString() + strOrder);
|
|
if (ds.Tables[0].Rows.Count > 0)
|
|
{
|
|
foreach (System.Data.DataRow Dr in ds.Tables[0].Rows)
|
|
{
|
|
zzyj += Convert.ToDouble(Dr["UpdateMoney"]);
|
|
zje += Convert.ToDouble(Dr["UpdateMoney2"]);
|
|
}
|
|
}
|
|
//zfs = (zzyj / 800);
|
|
|
|
Mtxfw.Utility.Tools.ToBind(Repeater1, ds);
|
|
|
|
}
|
|
|
|
|
|
}
|
|
} |