using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace Mtxfw.VipSite { public partial class Admin_Member_dongtai_pinglun : Mtxfw.Utility.MemberBase { private Mtxfw.Utility.Config config = new Mtxfw.Utility.Config(""); public Mtxfw.DAL.Article daoArt = new Mtxfw.DAL.Article(); public int gtype = 0; 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_news.aspx"); } if (IFStores != 1) { Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx"); } if (MemberJS.IndexOf("动态管理") == -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() { MyPager.PageSize = 50; MyPager.RecordCount = daoArt.GetCount("gtype=" + gtype + " and ParentID=23"); if (MyPager.RecordCount == 0) { MyPager.Visible = false; } Mtxfw.Utility.Tools.ToBind(Repeater1, daoArt.GetPager(MyPager, "(Select UserName From user_info b Where b.id=a.senderid) as senderName,", "gtype=" + gtype + " and ParentID=23 Order by AddTime 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 (strs == "0") { Mtxfw.Model.Article model = daoArt.GetModel(strID); if (model != null) { 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 = "删除动态评论,内容:" + model.Content + ""; logmodel.UType = 0; logmodel.gtype = gtype; new DAL.User_CZ_log().Add(logmodel); daoArt.Delete2(strID); } } } } Data_Bind(); } } }