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

136 lines
5.1 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_Commissionto : 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 daoResults = new Mtxfw.DAL.user_Results();
Mtxfw.Utility.Config config = new Mtxfw.Utility.Config("");
public string strTitle = "余额划转兑换积分列表";
public int gtype = 0;
public int t = 0;
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
string hostname = Request.Url.Host;
gtype = new DAL.host().GetId(hostname);
if (!String.IsNullOrEmpty(Request.QueryString["t"]))
{
t = Convert.ToInt32(Request.QueryString["t"].ToString());
}
if (t == 1)
{
strTitle = "兑换积分划转余额列表";
}
if (t == 2)
{
strTitle = "流量积分划转KSD列表";
}
if (t == 3)
{
strTitle = "KSD划转流量积分列表";
}
if (!IsPostBack)
{
if (Session["IFPassword"] == null)
{
Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_Commissionto.aspx");
}
if (IFStores != 1)
{
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
}
if (MemberJS.IndexOf(strTitle) == -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();
sb.Append("and utype=3 and UserId=" + t);
String MemberId = Request.QueryString["MemberId"];
String key = Request.QueryString["key"];
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') ");
}
if (gtype == 0)
{
if (Memberttype != -1)
{
sb.Append(" And gtype=" + Memberttype);
}
}
else
{
sb.Append(" And gtype=" + gtype);
}
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.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 realname From user_info b Where b.Id=a.MemberId) as realname,", "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")
{
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 = "删除"+ strTitle + "ID为" + strID;
logmodel.UType = 0;
logmodel.gtype = gtype;
new DAL.User_CZ_log().Add(logmodel);
}
}
}
Response.Redirect(Request.Url.AbsoluteUri);
}
}
}