Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string      searchMode = Request.QueryString["SearchMode"].ToString();
            GeneralUser user       = (Session["UserInfo"] as GeneralUser);
            int         userID     = user.Id;

            string strCon = "";
            string strTab = "";

            DataTable tempDt;

            switch (searchMode)
            {
            case "Finish":                                              //已处理稿件

                tempDt = ArticleManager.GetArticleByAessSendID(userID); //显示本人评论过稿件
                break;

            case "UnFinish":      //未处理稿件
                strTab = CreateTableCon(user.RoleInfo, userID);
                strCon = CreateConditionStr(user.RoleInfo, userID);
                tempDt = ArticleManager.GetArticleForUnfinsh(strTab, strCon);
                break;

            default:
                throw new Exception("不存在的稿件类型");
            }
            //绑定数据
            gvArticleList.DataSource = tempDt;
            gvArticleList.DataBind();
        }
    }