Views/Info/List.aspx.cs

(开头部分) 16KB

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

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MicroDBHelper;
using MicroPublicHelper;
using MicroAuthHelper;
using MicroUserHelper;

public partial class Views_Info_List : System.Web.UI.Page
{
    string ModuleID = "27";   //以“信息管理平台->信息平台” 菜单的ModuleID作为信息平台的权限设置
    public Boolean AdminRole = false;

    protected void Page_Load(object sender, EventArgs e)
    {
        AdminRole = MicroUserInfo.CheckUserRole("Administrators");

        //检查是否已经登录和页面唯一识别是否一致(ShortTableName)
        MicroAuth.CheckAuth(ModuleID, "InfoList");

        //检查是否有页面浏览权限
        MicroAuth.CheckBrowse(ModuleID);

        Boolean ApprovalPermit = MicroAuth.CheckPermit(ModuleID, "12"),
           EditPermit = MicroAuth.CheckPermit(ModuleID, "3"),  //修改自己
           EditAllPermit = MicroAuth.CheckPermit(ModuleID, "10"), //修改所有
           DelPermit = MicroAuth.CheckPermit(ModuleID, "16"),  //删除自己
           DelAllPermit = MicroAuth.CheckPermit(ModuleID, "18"),  //删除所有
           ViewAllPermit = MicroAuth.CheckPermit(ModuleID, "6");  //查看所有

        txtMID.Value = ModuleID;

        string InfoClassID = MicroPublic.GetFriendlyUrlParm(0);
        txtInfoClassID.Value = InfoClassID.toInt().ToString();

        string Keyword = MicroPublic.GetFriendlyUrlParm(1);
        txtAuxKeyword.Value = Keyword.toStringTrim();

        GetInfo(ApprovalPermit, EditPermit, EditAllPermit, DelPermit, DelAllPermit, ViewAllPermit, InfoClassID, Keyword);

    }


    private string GetInfo(Boolean ApprovalPermit, Boolean EditPermit, Boolean EditAllPermit, Boolean DelPermit, Boolean DelAllPermit, Boolean ViewAllPermit, string InfoClassID, string Keyword)
    {
        string flag = "<div class=\"fly-none\">没有相关数据</div>";
        int UID = MicroUserInfo.GetUserInfo("UID").toInt();

        string InfoClassIDStr = string.Empty,
            KeywordQueryStr = string.Empty;

        //如果开启全局搜索并且关键字不为空时设置InfoClassID="0",否则在分类内搜索
        Boolean IsGlobalSearch = MicroPublic.GetMicroInfo("InfoIsGlobalSearch").toBoolean();
        if (IsGlobalSearch && !string.IsNullOrEmpty(Keyword))
            InfoClassID = "0";
后面还有 243 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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