⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 twodomainname.aspx.cs

📁 易想商城系统
💻 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 System.Collections.Generic;
using YXShop.Web.Admin.Control;
using Shop.Web.UI;

namespace YXShop.Web.Admin.Shop
{
    public partial class TWODomainName : System.Web.UI.Page
    {
        YXShop.BLL.YXShop_Shop sBll = new YXShop.BLL.YXShop_Shop();
        BasePage bp = null;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!PowerTree.PowerPass.isPass("014004000", PowerTree.PowerPanel.PowerType.look))
            {
                bp = new BasePage();
                bp.PageError("对不起,你没有查看此页面的权限!", "../index.aspx");
            }
            this.PageNavigator1.OnPageChange += new PageChangeHandler(PageNavigator1_OnPageChange);
            if (!Page.IsPostBack)
            {
                //if (!string.IsNullOrEmpty(Request.QueryString["page"]))
                //{
                //    StartLoad(Convert.ToInt32(Request.QueryString["page"]));
                //    PageNavigator1.PageIndex = Convert.ToInt32(Request.QueryString["page"]);
                //}
                StartLoad(1);
                
            }
        }

        void PageNavigator1_OnPageChange(object send, int nPageIndex)
        {
            StartLoad(nPageIndex);
        }
        protected void StartLoad(int PageIndex)
        {
            int i = 0;
            int j = 0;
            List<YXShop.Model.YXShop_Shop> data = sBll.GetListByColumn("State", 0, PageIndex, 2, out i, out j);
            this.PageNavigator1.PageCount = j;
            this.PageNavigator1.PageIndex = PageIndex;
            this.PageNavigator1.RecordCount = i;
            Repeater1.DataSource = data;                              //设置datalist数据源
            Repeater1.DataBind();
        }

        protected void LBT_OnClick(object send, EventArgs e)
        {
            string strType = ((LinkButton)send).CommandName;
            int ID = Convert.ToInt32(((LinkButton)send).CommandArgument);

            switch (strType)
            {
                case "Del":
                    if (!PowerTree.PowerPass.isPass("014004003", PowerTree.PowerPanel.PowerType.del))
                    {
                        bp = new BasePage();
                        bp.PageError("对不起,你没有删除域名信息的权限!", "../index.aspx");
                    }
                    else
                    {
                        sBll.Amend(ID, "TWODomainName", "");
                    }
                    break;
                case "IsUse":
                    if (!PowerTree.PowerPass.isPass("014004006", PowerTree.PowerPanel.PowerType.other))
                    {
                        bp = new BasePage();
                        bp.PageError("对不起,你没有修改域名审核状态的权限!", "../index.aspx");
                    }
                    else
                    {
                        List<YXShop.Model.YXShop_Shop> data = sBll.GetListByColumn("SID", ID);
                        if (data.Count > 0)
                        {
                            string isUse = data[0].Attribute.Split(',')[5];

                            if (isUse == "0")
                            {
                                isUse = "1";
                            }
                            else
                            { isUse = "0"; }
                            isUse = data[0].Attribute.Substring(0, 10) + isUse;
                            sBll.Amend(ID, "Attribute", isUse);
                        }
                    }
                    break;
            }
            StartLoad(PageNavigator1.PageIndex);
        }

        #region 判断是否具有删除权限
        /// <summary>
        /// 判断是否具有删除权限
        /// </summary>
        /// <param name="powertype"></param>
        /// <returns></returns>
        public string GetPowerStr(string powertype)
        {
            string reStr = "";
            switch (powertype)
            {
                case "del":
                    reStr = PowerTree.PowerPass.isPass("014004003", PowerTree.PowerPanel.PowerType.del) ? "t" : "f";
                    break;
            }
            return reStr;
        }
        #endregion
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -