Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["type"] != null)
            {
                if (Request["type"] == "1")
                {
                    if (!RankService.IsModuleRank(1001))
                    {
                        Response.Write("<div style='width:100%;margin-top:200px;text-align:center;color:red;'>您没有本模块的操作权限! 请与管理员联系!</div>");
                        Response.End();
                    }
                }
                if (Request["type"] == "2")
                {
                    if (!RankService.IsModuleRank(1002))
                    {
                        Response.Write("<div style='width:100%;margin-top:200px;text-align:center;color:red;'>您没有本模块的操作权限! 请与管理员联系!</div>");
                        Response.End();
                    }
                }
            }
            else
            {
                if (!RankService.IsModuleRank(1001))
                {
                    Response.Write("<div style='width:100%;margin-top:200px;text-align:center;color:red;'>您没有本模块的操作权限! 请与管理员联系!</div>");
                    Response.End();
                }
            }
            if (!IsPostBack)
            {
                this.ddltype.DataSource     = FeedBackTypeService.GetAllFeedBackType();
                this.ddltype.DataTextField  = "typename";
                this.ddltype.DataValueField = "id";
                this.ddltype.DataBind();
                this.ddltype.Items.Insert(0, new ListItem("全部", "all"));

                this.rtNews.DataSource = pds();
                this.rtNews.DataBind();
                if (Request["flag"] != null)
                {
                    FeedBackService.SetFlag(Request["flag"].ToString() == "1"?true:false, int.Parse(Request["id"]));


                    Response.Redirect("feedback.aspx?page=" + Request["page"] + getcanshu());
                }
                else if (Request["del"] != null)
                {
                    string[] page = Request["page"].Split(',');
                    FeedBackService.DeleteFeedBack(int.Parse(Request["del"]));

                    Response.Redirect(Request["reUrl"].Replace("|", "&"));
                }
            }
        }