private void ReadWork() { if (Request.QueryString["Snum"] != null) { string Snum = Request.QueryString["Snum"].ToString(); LearnSite.Model.Students smodel = new LearnSite.Model.Students(); LearnSite.BLL.Students sbll = new LearnSite.BLL.Students(); smodel = sbll.SnumGetModel(Snum); LabelSnum.Text = Snum; LabelSname.Text = smodel.Sname; LabelWscore.Text = smodel.Sscore.ToString(); int wgrade = smodel.Sgrade.Value; if (Request.QueryString["Sgrade"] != null) { wgrade = Int32.Parse(Request.QueryString["Sgrade"].ToString()); } int wterm = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm()); if (Request.QueryString["Sterm"] != null) { wterm = Int32.Parse(Request.QueryString["Sterm"].ToString()); } LearnSite.BLL.Works ws = new LearnSite.BLL.Works(); DDLstore.DataSource = ws.ShowThisTermWorksCircle(Snum, wgrade, wterm); DDLstore.DataTextField = "Mtitle"; DDLstore.DataValueField = "Wurl"; DDLstore.DataBind(); int curindex = Int32.Parse(lbcurindex.Text); if (DDLstore.Items.Count > 0) { int allindex = DDLstore.Items.Count - 1; if (curindex == allindex) { lbcurindex.Text = "0"; } if (curindex < allindex) { DDLstore.SelectedIndex = curindex; } } } }