예제 #1
0
 private void ChkRole(string Roleid)
 {
     TPortalClass.JpRoleuser JpRoleuser = new TPortalClass.JpRoleuser();
     if (JpRoleuser.isHaveRole(Roleid, this.Session["uid"].ToString()) == true || JpRoleuser.isHaveRole("Role9999", this.Session["uid"].ToString()) == true)
     {
         btnSubmit.Visible = true;
     }
     else
     {
         btnSubmit.Visible = false;
     }
 }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["uid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        //if (this.Request.QueryString["deptid"] != null)
        //    this.deptid = this.Request.QueryString["deptid"].ToString();

        if (this.Request.QueryString["keywords"] != null)
            this.keywords = this.Request.QueryString["keywords"].ToString();

        if (this.Request.QueryString["cid"] != null)
        {
            this.cid = this.Request.QueryString["cid"].ToString();
            this.txtcid.Text = this.Request.QueryString["cid"].ToString();
        }
        this.pageSize = 10; //每页数量
        if (!Page.IsPostBack)
        {
            //DeptBind(this.cid);  //绑定栏目
            //判断权限
            TPortalClass.JpRoles JpRoles = new TPortalClass.JpRoles();
            if (JpRoles.ifhaveAuthorRoleBycidanduid(this.Session["uid"].ToString(), this.cid) != true)
            {
                this.Response.Write("<script>alert('你没有该栏目的编辑权限,请联系管理员!');</script>");
                return;
            }
            TPortalClass.JpColumns JpColumns = new TPortalClass.JpColumns();
            DataTable dtcol = JpColumns.GetColumnBycid(this.cid);
            if (dtcol.Rows[0]["hotpublish"].ToString() == "1")
            {
                this.tdnewdoc.Visible = false;
            }
            TPortalClass.JpRoleuser JpRoleuser = new TPortalClass.JpRoleuser();
            if (JpRoleuser.isHaveRole("Role9999", this.Session["uid"].ToString()) == true)
            {
                btnDelete.Visible = true;
            }
            else
            {
                btnDelete.Visible = false;
            }
            RptBind();

        }
    }
예제 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["uid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        if (!Page.IsPostBack)
        {
            DataPlay();
            TPortalClass.JpRoleuser JpRoleuser = new TPortalClass.JpRoleuser();
            if (JpRoleuser.isHaveRole("Role9999", this.Session["uid"].ToString()) == true)
            {
                btnsave.Visible = true;
            }
            else
            {
                btnsave.Visible = false;
            }
        }
    }
예제 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.Session["uid"].ToString() == "")
            this.Response.Redirect("../login.aspx");

        if (this.Request.QueryString["keywords"] != null)
            this.keywords = this.Request.QueryString["keywords"].ToString();

        if (this.Request.QueryString["cid"] != null)
        {
            this.cid = this.Request.QueryString["cid"].ToString();
            this.txtcid.Text = this.Request.QueryString["cid"].ToString();
        }
        this.pageSize = 10; //每页数量
        if (!Page.IsPostBack)
        {
            ////新建按钮热发布时显示
            //TPortalClass.JpColumns JpColumns = new TPortalClass.JpColumns();
            //DataTable dtcol = JpColumns.GetColumnBycid(this.cid);
            //this.lbldht.Text = dtcol.Rows[0]["cname"].ToString();
            //if (dtcol.Rows[0]["hotpublish"].ToString() == "1")
            //{
            //    this.tdnewdoc.Visible = true;
            //}
            //else
            //{
            //    this.tdnewdoc.Visible = false;
            //}

            ////判断权限
            //TPortalClass.JpRoles JpRoles = new TPortalClass.JpRoles();
            //if (JpRoles.ifhaveEditorRoleBycidanduid(this.Session["uid"].ToString(), this.cid) != true)
            //{
            //    this.Response.Write("<script>alert('你没有该栏目的发布权限,请联系管理员!');</script>");
            //    return;
            //}
            TPortalClass.JpRoleuser JpRoleuser = new TPortalClass.JpRoleuser();
            if (JpRoleuser.isHaveRole("Role9999", this.Session["uid"].ToString()) == true)
            {
                btnDelete.Visible = true;
            }
            else
            {
                btnDelete.Visible = false;
            }

            RptBind();

            if (txtcid.Text.Substring(0, 3) == "003" && txtcid.Text != "003004")
            {
                ls_show = "";
                ls_width1 = "40%";
                ls_width2 = "10%";
            }
            else
            {
                ls_show = "none";
                ls_width1 = "50%";
                ls_width2 = "0%";
            }
        }
    }
예제 #5
0
파일: index.aspx.cs 프로젝트: wjszxli/xdjb
 //检查权限
 private string ChkRole(string Roleid)
 {
     string ls_return = "0";
     TPortalClass.JpRoleuser JpRoleuser = new TPortalClass.JpRoleuser();
     if (JpRoleuser.isHaveRole(Roleid, this.Session["uid"].ToString()) == true || JpRoleuser.isHaveRole("Role9999", this.Session["uid"].ToString()) == true)
     {
         ls_return = "1";
     }
     return ls_return;
 }