📄 themes.aspx.cs
字号:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using YXShop.BLL;
using YXShop.Common;
using Shop.Web.UI;
namespace YXShop.Web.Admin.ShopThemes
{
public partial class Themes : System.Web.UI.Page
{
YXShop_ShopThemes B_ShopThemes = new YXShop_ShopThemes();
protected PageSet ps;
Model.YXShop_ShopThemes M_ShopThemes = new YXShop.Model.YXShop_ShopThemes();
BasePage bp = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!PowerTree.PowerPass.isPass("015001000", PowerTree.PowerPanel.PowerType.look))
{
bp = new BasePage();
bp.PageError("对不起,你没有查看该页面的权限!", "../index.aspx");
}
if (!IsPostBack)
{
BindData();
}
}
void BindData()
{
int pageIndex = Request["pageIndex"] == null ? 0 : int.Parse(Request["pageIndex"]);
if (pageIndex < 0)
{
pageIndex = 0;
}
if ((Request["Event"] == null) || (Request["Event"] == ""))
{
pageIndex = 0;
}
DataSet ds = DBUtility.Pagination.Pages("YXShop_ShopThemes", "TID", "*", PageSet.PageSize, pageIndex, "TID", null);
ps = new YXShop.Common.PageSet(DBUtility.Pagination.GetPageCount("TID", "YXShop_ShopThemes", null), PageSet.PageSize, pageIndex);
rptThemes.DataSource = ds;
rptThemes.DataBind();
}
protected void lbtOperation(object s, EventArgs e)
{
string dataType = ((LinkButton)s).CommandName;
string ID = ((LinkButton)s).CommandArgument;
switch (dataType)
{
case "Use":
if (!PowerTree.PowerPass.isPass("015001007", PowerTree.PowerPanel.PowerType.other))
{
bp = new BasePage();
bp.PageError("对不起,你没有修改使用状态的权限!", "../index.aspx");
}
else
{
if (B_ShopThemes.Amend(Convert.ToInt32(ID.Split(',')[0]), "TState", ID.Split(',')[1] == "1" ? 0 : 1) > 0)
{
alert.showOnly("修改使用状态成功");
}
else
{ alert.showOnly("修改使用状态失败"); }
}
break;
case "Del":
if (!PowerTree.PowerPass.isPass("015001003", PowerTree.PowerPanel.PowerType.del))
{
bp = new BasePage();
bp.PageError("对不起,你没有删除店铺风格的权限!", "../index.aspx");
}
else
{
M_ShopThemes.TID = Convert.ToInt32(ID);
if (B_ShopThemes.Delect(M_ShopThemes) > 0)
{
alert.showOnly("删除成功");
}
else { alert.showOnly("删除失败"); }
}
break;
}
BindData();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -