📄 pro_unitlist.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.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Shop.Web.UI;
namespace YXShop.Web.Admin.Product
{
public partial class Pro_UnitList : System.Web.UI.Page
{
YXShop.BLL.Pro_Unit dataCA = new YXShop.BLL.Pro_Unit();
BasePage bp = null;
protected void Page_Load(object sender, EventArgs e)
{
AjaxPro.Utility.RegisterTypeForAjax(typeof(YXShop.Web.Admin.Product.Pro_UnitList));
if (!PowerTree.PowerPass.isPass("001004000", PowerTree.PowerPanel.PowerType.look))
{
bp = new BasePage();
bp.PageError("对不起,你没有查看此页面的权限!", "../index.aspx");
}
if ((!IsPostBack) || ((Request["Event"] != null) && (Request["Event"] != "")))
{
grid();
}
}
#region 列表
protected void grid()
{
GridView1.DataSource = dataCA.GetAll();
GridView1.DataBind();
}
#endregion
#region "册除"
[AjaxPro.AjaxMethod]
public string UnitDel(int id)
{
if (PowerTree.PowerPass.isPass("001004003", PowerTree.PowerPanel.PowerType.del))
{
YXShop.Model.Pro_Unit data = new YXShop.Model.Pro_Unit();
data.ProU_ID = id;
dataCA.Delect(data);
}
return string.Empty;
}
public string GetPowerStr(string powertype)
{
string reStr = "";
switch (powertype)
{
case "del":
reStr = PowerTree.PowerPass.isPass("001004003", PowerTree.PowerPanel.PowerType.del) ? "t" : "f";
break;
}
return reStr;
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -