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

65 lines
2.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Mtxfw.shop._Admin
{
public partial class admin_vip_gong2 : Mtxfw.Utility.AdminPage
{
public Mtxfw.DAL.Article daoArt = new Mtxfw.DAL.Article();
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (!IsPostBack)
{
Data_Bind();
}
AspNetPager1.PageChanged += delegate(object s, EventArgs ex)
{
Data_Bind();
};
}
protected void Data_Bind()
{
AspNetPager1.PageSize = 100;
AspNetPager1.RecordCount = daoArt.GetCount("ParentID=8");
Mtxfw.Utility.Tools.ToBind(Repeater1, daoArt.GetPager(AspNetPager1, "(Select UserName From user_info b Where b.id=a.senderid) as senderName,(Select UserName From user_info b Where b.id=a.receiverid) as receiverName,", "ParentID=8 Order by Seef,ID desc"));
}
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 (seclect_Drop.SelectedItem.Value == "0")
{
daoArt.UpdateuSel("Seef", 1, strID);
}
else if (seclect_Drop.SelectedItem.Value == "1")
{
daoArt.UpdateuSel("Seef", 0, strID);
}
else if (seclect_Drop.SelectedItem.Value == "2")
{
daoArt.Delete(strID);
}
}
}
Response.Redirect(Request.Url.AbsoluteUri);
}
}
}