Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ViewState["mode"] = Request.QueryString.Get("mode");
                hfMode.Value      = ViewState["mode"].ToString();


                string PaperCategoryID = Request.QueryString.Get("PaperCategoryIDPath");
                if (!string.IsNullOrEmpty(PaperCategoryID))
                {
                    string[] str1 = PaperCategoryID.Split(new char[] { '/' });

                    int nID = int.Parse(str1[str1.LongLength - 1].ToString());


                    hfPaperCategoryID.Value = nID.ToString();
                    PaperCategoryBLL pcl = new PaperCategoryBLL();

                    RailExam.Model.PaperCategory pc = pcl.GetPaperCategory(nID);

                    txtCategoryName.Text = pc.CategoryName;
                }


                string strPaperStrategyID = Request.QueryString.Get("id");
                if (!string.IsNullOrEmpty(strPaperStrategyID))
                {
                    FillPage(int.Parse(strPaperStrategyID));
                }
            }
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (PrjPub.CurrentLoginUser == null)
                {
                    Response.Redirect("/RailExamBao/Common/Error.aspx?error=Session过期请重新登录本系统!");
                    return;
                }
                ViewState["mode"] = Request.QueryString.Get("mode");
                hfMode.Value      = ViewState["mode"].ToString();
                string PaperCategoryID = Request.QueryString.Get("PaperCategoryIDPath");
                if (!string.IsNullOrEmpty(PaperCategoryID))
                {
                    string[] str1 = PaperCategoryID.Split(new char[] { '/' });

                    int nID = int.Parse(str1[str1.LongLength - 1].ToString());


                    hfCategoryId.Value = nID.ToString();
                    PaperCategoryBLL pcl = new PaperCategoryBLL();

                    RailExam.Model.PaperCategory pc = pcl.GetPaperCategory(nID);

                    txtCategoryName.Text = pc.CategoryName;
                }
                string strPaperID = Request.QueryString.Get("id");
                if (!string.IsNullOrEmpty(strPaperID))
                {
                    FillPage(int.Parse(strPaperID));
                }
            }
        }