Snailsoft.CRM.Business/CRM/Business/BasePage.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

namespace Snailsoft.CRM.Business
{
    using System;
    using System.Data;
    using Snailsoft.Common;
    using Snailsoft.CRM.Common;

    public class BasePage : CommonBasePage
    {
        private string curPageURL;
        private string m_sessionAccount;
        private string m_sessionName;
        private int m_sessionUID;
        private DataTable minPotTable;
        private DataTable potenceTable;

        private bool AllowShow()
        {
            this.GetCurPotence();
            if(this.minPotTable.Rows.Count == 0) return true;
            int minPagePotence = Convert.ToInt32(this.minPotTable.Rows[0][0]);
            if (minPagePotence == -1)
            {
                return true;
            }
            for (int i = 0; i < this.potenceTable.Rows.Count; i++)
            {
                if (minPagePotence <= Convert.ToInt32(this.potenceTable.Rows[i][1]))
                {
                    return true;
                }
            }
            return false;
        }

        protected void CheckLogin()
        {
            if (this.Session["User.ID"] == null)
            {
                this.GoToPage("NotLogin.aspx");
            }
            else
            {
                this.m_sessionUID = Convert.ToInt32(this.Session["User.ID"]);
                this.m_sessionName = this.Session["User.Name"].ToString();
                this.m_sessionAccount = this.Session["User.Account"].ToString();
            }
        }

        protected void CheckPerm()
        {
            if (!this.AllowShow())
            {
                this.GoToPage("NoReadPotence.aspx");
            }
            this.ShowElement();
        }

        private void GetCurPotence()
        {
后面还有 86 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。