📄 mo_cuslabelmanage.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.Templates
{
public partial class Mo_CusLabelManage : System.Web.UI.Page
{
public int pageIndexNow = 1;//页码
public string ShowPageText = "";
BasePage bp = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!PowerTree.PowerPass.isPass("011002000", PowerTree.PowerPanel.PowerType.look))
{
bp = new BasePage();
bp.PageError("对不起,你没有查看此页面的权限!", "../index.aspx");
}
//-控制分页参数--------------------------------
if (Request.QueryString["page"] != null)
{
try
{
this.pageIndexNow = Convert.ToInt32(Request.QueryString["page"]);
}
catch {
this.pageIndexNow = 1;
}
}
else
{
this.pageIndexNow = 1;
}
//--------------------------
if (!IsPostBack)
{
if ((!string.IsNullOrEmpty(Request["LabelID"])) && Request["action"] == "del")
{
if (!PowerTree.PowerPass.isPass("011002003", PowerTree.PowerPanel.PowerType.del))
{
bp = new BasePage();
bp.PageError("对不起,你没有删除自定义标签的权限!", "../index.aspx");
}
else
{
try
{
YXShop.TemplateAction.CusLabelDo.DelCusLabel(Request["LabelID"]);
}
catch { }
}
}
if (!string.IsNullOrEmpty(Request["LabelKindID"]))
{
BindData(Request["LabelKindID"]);
}
else
{
BindData("");
}
}
}
public void BindData(string _where)
{
string whereStr = " CusLabel_Colour in (Select TP_ID from YX_TemplateProgramme where TP_IsDefault=1)";
if(!string.IsNullOrEmpty(_where))
{
whereStr = " CusLabel_Kind=" + _where;
}
try
{
YXShop.DBUtility.Pager pager = new YXShop.DBUtility.Pager();
CusLabel_List.DataSource = pager.PageSelect(YXShop.DBUtility.SqlHelper.ConnectionStringLocalTransaction, "YX_CusLabels", "CusLabel_ID,CusLabel_Name,CusLabel_Des,CusLabel_Content,CusLabel_Date,CusLabel_Kind,CusLabel_Colour", "CusLabel_ID", 20, this.pageIndexNow, 1, whereStr);
CusLabel_List.DataBind();
this.ShowPageText = pager.PageText("Mo_CusLabelManage.aspx?LabelKindID="+Request["LabelKindID"]+"");
}
catch { }
}
public string CutString(string str)
{
return YXShop.Common.WebUtility.GetLenghtAll(str, 12) + "..";
}
public string GetKindName(string _kindId)
{
if (!string.IsNullOrEmpty(_kindId))
{
return YXShop.TemplateAction.CusLabelDo.GetSingleLabelKindName(_kindId);
}
else {
return "<font color='red'>不详</font>";
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -