180 lines
6.9 KiB
C#
180 lines
6.9 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_CurrencyTransfer : 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();
|
|
Mtxfw.DAL.user_bank daoBank = new Mtxfw.DAL.user_bank();
|
|
public int gtype = 0;
|
|
public int t = 0;
|
|
public string strTitle = "";
|
|
#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 (!String.IsNullOrEmpty(Request.QueryString["t"]))
|
|
{
|
|
t = Convert.ToInt32(Request.QueryString["t"].ToString());
|
|
}
|
|
if (t == 1)
|
|
{
|
|
strTitle = "余额互转列表";
|
|
}
|
|
if (t == 2)
|
|
{
|
|
strTitle = "兑换积分互转列表";
|
|
}
|
|
if (t == 3)
|
|
{
|
|
strTitle = "贡献值互转列表";
|
|
}
|
|
if (t == 4)
|
|
{
|
|
strTitle = "佣金互转列表";
|
|
}
|
|
if (t == 5)
|
|
{
|
|
strTitle = "赠送KSD列表";
|
|
}
|
|
if (!IsPostBack)
|
|
{
|
|
if (Session["IFPassword"] == null)
|
|
{
|
|
Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_CurrencyTransfer.aspx");
|
|
}
|
|
if (IFStores != 1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
if (MemberJS.IndexOf(strTitle) == -1)
|
|
{
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|
}
|
|
Page.Title = "转账管理 - " + GetWebName;
|
|
|
|
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"];
|
|
String MemberId = Request.QueryString["MemberId"];
|
|
String key = Request.QueryString["key"];
|
|
sb.Append("and utype=11 and Seef=-1 and b18=" + t);
|
|
if (gtype == 0)
|
|
{
|
|
if (Memberttype != -1)
|
|
{
|
|
sb.Append(" And gtype=" + Memberttype);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
sb.Append(" And gtype=" + gtype);
|
|
}
|
|
if (!String.IsNullOrEmpty(SJ) && !String.IsNullOrEmpty(SJ2))
|
|
{
|
|
sb.Append(" and (addtime between '" + SJ + " 00:00:00' and '" + SJ2 + " 23:59:59') ");
|
|
}
|
|
if (!String.IsNullOrEmpty(MemberId))
|
|
{
|
|
sb.Append(" and MemberId=" + MemberId);
|
|
}
|
|
if (!String.IsNullOrEmpty(key))
|
|
{
|
|
key = key.Trim();
|
|
sb.Append(" and (MemberId=(Select id from user_info b where b.gtype=" + gtype + " and b.UserName='" + key + "') Or UserId=(Select id from user_info b where b.gtype=" + gtype + " and b.UserName='" + key + "'))");
|
|
}
|
|
string strOrder = " Order By addtime desc";
|
|
MyPager.PageSize = 50;
|
|
MyPager.RecordCount = daoResults.GetCount("gtype=" + gtype + " and IFDelete=0" + sb.ToString());
|
|
if (MyPager.RecordCount == 0)
|
|
{
|
|
MyPager.Visible = false;
|
|
}
|
|
Mtxfw.Utility.Tools.ToBind(Repeater1, daoResults.GetPager(MyPager, "(Select UserName From user_info b Where b.Id=a.MemberId) as MemberName,(Select UserName From user_info b Where b.Id=a.UserId) as UserName,(Select realname From user_info b Where b.Id=a.MemberId) as realname,(Select realname From user_info b Where b.Id=a.UserId) as realname2,", "gtype=" + gtype + " and IFDelete=0" + sb.ToString() + strOrder));
|
|
}
|
|
protected void Run_Click(object s, System.EventArgs e)
|
|
{
|
|
CheckBox Check = new CheckBox();
|
|
string strs = seclect_Drop.SelectedItem.Value;
|
|
foreach (RepeaterItem Item in Repeater1.Items)
|
|
{
|
|
//在行中查找到该单选框
|
|
Check = (CheckBox)Item.FindControl("checka");
|
|
int strID = int.Parse(Check.CssClass);
|
|
if (Check.Checked == true)
|
|
{
|
|
if (strs == "2")
|
|
{
|
|
Mtxfw.Model.user_Results mr = daoResults.GetModel(strID);
|
|
if (mr != null)
|
|
{
|
|
Mtxfw.Model.user_info umodel = daoUser.GetModel(mr.MemberId);
|
|
if (umodel != null)
|
|
{
|
|
daoResults.UpdateIFDelete(1, DateTime.Now.ToString(), strID);
|
|
Model.User_CZ_log logmodel = new Model.User_CZ_log();
|
|
logmodel.MemberId = Card;
|
|
logmodel.AddTime = DateTime.Now;
|
|
logmodel.IP = Mtxfw.Utility.Common.GetIP;
|
|
logmodel.Body = "删除转账记录,用户名为" + umodel.UserName + ",转账时间为" + mr.addtime + ",转账金额为" + mr.Totalmoney;
|
|
logmodel.UType = 0;
|
|
logmodel.gtype = gtype;
|
|
new DAL.User_CZ_log().Add(logmodel);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Response.Redirect(Request.Url.AbsoluteUri);
|
|
}
|
|
|
|
}
|
|
} |