104 lines
3.8 KiB
C#
104 lines
3.8 KiB
C#
|
|
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_Goods_lb : 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("");
|
|||
|
|
protected Mtxfw.DAL.user_Goods_lb daolb = new Mtxfw.DAL.user_Goods_lb();
|
|||
|
|
protected string strIFKD = "", strIFNoKD = "", FHJE="0";
|
|||
|
|
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;
|
|||
|
|
gtype = new DAL.host().GetId(hostname);
|
|||
|
|
if (!IsPostBack)
|
|||
|
|
{
|
|||
|
|
if (Session["IFPassword"] == null)
|
|||
|
|
{
|
|||
|
|
Response.Redirect("/Member_IFPassword.aspx?Url=/Admin_Member_Goods_lb.aspx");
|
|||
|
|
}
|
|||
|
|
if (IFStores != 1)
|
|||
|
|
{
|
|||
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|||
|
|
}
|
|||
|
|
if (MemberJS.IndexOf("操作教程") == -1)
|
|||
|
|
{
|
|||
|
|
Mtxfw.Utility.Tools.Message("您没有权限!", "/gl.aspx");
|
|||
|
|
}
|
|||
|
|
Page.Title = "分类管理 - " + GetWebName;
|
|||
|
|
|
|||
|
|
Mtxfw.Utility.Tools.ToBind(Repeater1, daolb.GetList("gtype=" + gtype + " and utype=0 Order By LBLinkID"));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
protected void Delete_Click(object s, CommandEventArgs e)
|
|||
|
|
{
|
|||
|
|
int Id = int.Parse(e.CommandName);
|
|||
|
|
Mtxfw.Model.user_Goods_lb model = daolb.GetModel(Id);
|
|||
|
|
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.LBName;
|
|||
|
|
logmodel.UType = 0;
|
|||
|
|
logmodel.gtype = gtype;
|
|||
|
|
new DAL.User_CZ_log().Add(logmodel);
|
|||
|
|
}
|
|||
|
|
daolb.Delete(Id);
|
|||
|
|
|
|||
|
|
Response.Redirect("Admin_Member_Goods_lb.aspx");
|
|||
|
|
}
|
|||
|
|
protected void dgPublisher_DataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
|
|||
|
|
{
|
|||
|
|
LinkButton lb = (LinkButton)e.Item.FindControl("Btn_Delete");
|
|||
|
|
lb.Attributes.Add("OnClick", "return confirm('您确定要执行删除吗?');");
|
|||
|
|
/*if (lb.CommandArgument == "7")
|
|||
|
|
{
|
|||
|
|
lb.Visible = false;
|
|||
|
|
}*/
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|