Beispiel #1
0
 private void Readwork()
 {
     if (Request.QueryString["Sg"] != null && Request.QueryString["Sc"] != null && Request.QueryString["Ci"] != null && Request.QueryString["Mi"] != null)
     {
         int Sgrade = Int32.Parse(Request.QueryString["Sg"].ToString());
         int Sclass = Int32.Parse(Request.QueryString["Sc"].ToString());
         int Cid    = Int32.Parse(Request.QueryString["Ci"].ToString());
         int Mid    = Int32.Parse(Request.QueryString["Mi"].ToString());
         int Wscore = 0;
         if (CkselectG.Checked)
         {
             Wscore = 12;
         }
         if (CheckselectA.Checked)
         {
             Wscore = 10;
         }
         LearnSite.BLL.Works ws = new LearnSite.BLL.Works();
         DDLstore.DataSource     = ws.ShowCircleWorksSelect(Sgrade, Sclass, Cid, Mid, Wscore);
         DDLstore.DataTextField  = "Sname";
         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;
             }
         }
     }
 }