protected void DataList_wai_ItemDataBound(object sender, DataListItemEventArgs e) { Label lb = (Label)e.Item.FindControl("Labelgrade"); DataList dl = (DataList)e.Item.FindControl("DataList_li"); LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper(); int gd = Int32.Parse(lb.Text); dl.DataSource = pbll.ShowTopTypeScore(gd, gettop()); dl.DataBind(); ((Label)e.Item.FindControl("Labelgrade")).Text = LearnSite.Common.WordProcess.ChineseNum(gd) + "年级"; }
private void showtops() { if (DDLgrade.SelectedValue != "") { int grade = Int32.Parse(DDLgrade.SelectedValue); int top = Int32.Parse(DDLtop.SelectedValue); string tys = DDLtype.SelectedValue; switch (tys) { case "0": LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper(); DataList_A4.DataSource = pbll.ShowTopTypeScore(grade, top); DataList_A4.DataBind(); break; case "1": LearnSite.BLL.Pfinger fbll = new LearnSite.BLL.Pfinger(); DataList_A4.DataSource = fbll.ShowTopFingerScoreAs(grade, top); DataList_A4.DataBind(); break; } } }