Views/Info/Detail.aspx.cs

(开头部分) 12KB

这里只显示每个文件的开头 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_Detail : System.Web.UI.Page
{
    string ModuleID = MicroPublic.GetFriendlyUrlParm(0); //"27";
    protected void Page_Load(object sender, EventArgs e)
    {
        //检查是否已经登录和页面唯一识别是否一致(ShortTableName)
        MicroAuth.CheckAuth(ModuleID, "InfoList");

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

        txtMID.Value = ModuleID;
    }

    protected string GetDetail()
    {
        string InfoID = MicroPublic.GetFriendlyUrlParm(1);
        int UID = MicroUserInfo.GetUserInfo("UID").toInt();

        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");  //查看所有

        string flag = "<div class=\"fly-panel detail-box\"><div class=\"fly-none\">没有相关数据</div></div>";

        string _sql = "select a.*,b.InfoClassName,b.Description,c.DeptName from Information a left join InformationClass b on a.InfoClassID=b.ICID left join Department c on a.DeptID=c.DeptID where PushToInfoPlatform=1 and InfoID=@InfoID and a.Invalid=0 and a.Del=0  ";
        SqlParameter[] _sp = { new SqlParameter("@InfoID", SqlDbType.Int) };

        _sp[0].Value = InfoID.toInt();

        DataTable _dt = MsSQLDbHelper.Query(_sql, _sp).Tables[0];

        //得到当前用户角色
        string _sqlUserRoles = "select * from UserRoles where Invalid=0 and Del=0 and UID=" + UID + "";
        DataTable _dtUserRoles = MsSQLDbHelper.Query(_sqlUserRoles).Tables[0];

        //得到当前用户职位
        string _sqlJobTitle = "select * from UserJobTitle where Invalid=0 and Del=0 and UID=" + UID + "";
        DataTable _dtJobTitle = MsSQLDbHelper.Query(_sqlJobTitle).Tables[0];

        //得到当前用户部门
        string _sqlUserDepts = "select * from UserDepts where Invalid=0 and Del=0 and UID=" + UID + "";
        DataTable _dtUserDepts = MsSQLDbHelper.Query(_sqlUserDepts).Tables[0];

后面还有 160 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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