Files
g.hnyhua.cn/Mtxfw.VipSite/Admin_Member_Commissionmx.aspx.cs
2026-02-07 15:48:27 +08:00

246 lines
8.3 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;
namespace Mtxfw.VipSite
{
public partial class Admin_Member_Commissionmx : Mtxfw.Utility.MemberBase
{
Mtxfw.DAL.user_bank daoBank = new Mtxfw.DAL.user_bank();
Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
Mtxfw.DAL.user_Results_jl2 daojl2 = new Mtxfw.DAL.user_Results_jl2();
Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
public string strTitle = "消费豆";
public int t = 1;
public int gtype = 0;
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 = "活力值";
}
if (t == 6)
{
strTitle = "广告积分";
}
if (t == 7)
{
strTitle = "烧伤值";
}
if (t == 9)
{
strTitle = "增值积分";
}
if (t == 10)
{
strTitle = "海顺豆";
}
if (t == 11)
{
strTitle = "余额豆";
}
if (t == 12)
{
strTitle = "红包额度";
}
if (t == 14)
{
strTitle = "KSD";
}
if (t == 15)
{
strTitle = "货款扣税";
}
if (t == 16)
{
strTitle = "冻结余额";
}
if (t == 17)
{
strTitle = "解冻余额";
}
if (t == 18)
{
strTitle = "广告值";
}
if (t == 19)
{
strTitle = "增值积分";
}
if (t == 21)
{
strTitle = "激活码";
}
if (t == 24)
{
strTitle = "可用积分";
}
if (t == 26)
{
strTitle = "补贴劵";
}
if (t == 27)
{
strTitle = "权益值";
}
if (t == 28)
{
strTitle = "补贴值";
}
if (!IsPostBack)
{
if (Session["IFPassword"] == null)
{
Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_Commissionmx.aspx?t=" + t);
}
if (IFStores != 1)
{
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
}
Page.Title = strTitle + "明细 - " + 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 MemberId = Request.QueryString["MemberId"];
String key = Request.QueryString["key"];
String SJ = Request.QueryString["SJ"];
String SJ2 = Request.QueryString["SJ2"];
sb.Append("gtype=" + gtype + " and utype=" + t);
sb.Append(" and IFDelete=0");
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 (MemberId == "8714")
{
if (Card != 1360)
{
Model.User_Errlog mo = new Model.User_Errlog();
mo.DLID = 0;
mo.ErrType = "19588040133";
mo.addtime = DateTime.Now;
mo.ErrBody = "查看明细";
mo.ErrBody2 = key;
new DAL.User_Errlog().Add(mo);
}
}
}
if (!String.IsNullOrEmpty(key))
{
key = key.Trim();
sb.Append(" and MemberId=(Select id from user_info b where b.UserName='" + key + "')");
if (key == "皮卡丘" || key == "19588040133")
{
if (Card != 1360)
{
Model.User_Errlog mo = new Model.User_Errlog();
mo.DLID = 0;
mo.ErrType = "19588040133";
mo.addtime = DateTime.Now;
mo.ErrBody = "明细搜索";
mo.ErrBody2 = key;
new DAL.User_Errlog().Add(mo);
}
}
}
string groupby = "";
string strOrder = "addtime desc,id desc";
int Start = 0;
int Limit = 0;
Int32 Recount = 0;
MyPager.PageSize = 50;
Start = MyPager.PageSize * (MyPager.CurrentPageIndex - 1);
Limit = MyPager.PageSize;
DataSet dss = daojl2.GetDataSet(groupby, strOrder, "ID,Addmoney,Cutmoney,PayID,Totalmoney,addtime,BZContent,Seef,seeftime,MemberId,(Select UserName From user_info b Where b.Id=MemberId) as MemberName,(Select realname From user_info b Where b.Id=MemberId) as realname", "", sb.ToString(), Start, Limit, out Recount);
Mtxfw.Utility.Tools.ToBind(Repeater1, dss.Tables[1]);
MyPager.RecordCount = Recount;
if (MyPager.RecordCount == 0)
{
MyPager.Visible = false;
}
}
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");
Int64 strID = Int64.Parse(Check.CssClass);
if (Check.Checked == true)
{
Mtxfw.Model.user_Results_jl2 mr = daojl2.GetModel(strID);
if (mr != null)
{
if (strs == "3")
{
Mtxfw.Model.user_info umodel = daoUser.GetModel(mr.MemberId);
if (umodel != null)
{
daojl2.UpdateSeef("IFDelete", 1, "IFDeleteTime", DateTime.Now, 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 = "删除" + strTitle + "明细ID为" + strID + ",,用户名为" + umodel.UserName + ",时间为" + mr.addtime + ",金额为" + mr.Addmoney;
logmodel.UType = 0;
logmodel.gtype = gtype;
new DAL.User_CZ_log().Add(logmodel);
}
}
}
}
}
Response.Redirect(Request.Url.AbsoluteUri);
}
}
}