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

130 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.Data;
using System.Data.SqlClient;
namespace Mtxfw.VipSite
{
public partial class Admin_Member_seefedusers : Mtxfw.Utility.MemberBase
{
public Mtxfw.DAL.queue_window daoQuque = new DAL.queue_window();
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("");
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_seefedusers.aspx");
}
if (IFStores != 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 strID = Request.QueryString["MemberId"];
sb.Append("and utype=13");
if (gtype == 0)
{
if (Memberttype != -1)
{
sb.Append(" And gtype=" + Memberttype);
}
}
else
{
sb.Append(" And gtype=" + gtype);
}
string strOrder = " Order By addtime desc";
MyPager.PageSize = 50;
MyPager.RecordCount = daoResults.GetCount("gtype=" + gtype + " and IFDelete=0 and (Select count(id) From user_info b Where b.Id=a.UserId)>0" + sb.ToString());
if (MyPager.RecordCount == 0)
{
MyPager.Visible = false;
}
if (!String.IsNullOrEmpty(strID))
{
sb.Append("and MemberId=" + strID);
}
Mtxfw.Utility.Tools.ToBind(Repeater1, daoResults.GetPager(MyPager, "(Select UserName From user_info b Where b.Id=a.UserId) as UserName,(Select UserName From user_info b Where b.Id=a.MemberId) as MemberName,(Select uLevel From user_info b Where b.Id=a.UserId) as uLevel,(Select uLevel1 From user_info b Where b.Id=a.UserId) as uLevel1,(Select uLevel2 From user_info b Where b.Id=a.UserId) as uLevel2,(Select uLevel4 From user_info b Where b.Id=a.UserId) as uLevel4,(Select UserState From user_info b Where b.Id=a.UserId) as UserState,", "gtype=" + gtype + " and IFDelete=0 and (Select count(id) From user_info b Where b.Id=a.UserId)>0" + sb.ToString() + strOrder));
}
protected void Run_Click(object s, System.EventArgs e)
{
if (IsRefresh == false)
{
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)
{
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 = "删除开通会员记录ID" + strID + "";
logmodel.UType = 0;
logmodel.gtype = gtype;
new DAL.User_CZ_log().Add(logmodel);
daoResults.UpdateIFDelete(1, DateTime.Now.ToString(), strID);
}
}
Data_Bind();
}
}
}
}