private void ShowCid() { string Hid = Request.Cookies["TeacherCookies"].Values["Hid"].ToString(); if (Session[Hid+"Setgrade"] != null && Session[Hid+"Setclass"] != null) { Labelshow.Text = Session[Hid+"Setgrade"].ToString() + "年级" + Session[Hid+"Setclass"].ToString()+"班---作品展示"; int Sgrade = Int32.Parse(Session[Hid+"Setgrade"].ToString()); int Sclass = Int32.Parse(Session[Hid+"Setclass"].ToString()); LearnSite.BLL.Works wbll = new LearnSite.BLL.Works(); string myCid = wbll.GetTodayCid(Sgrade, Sclass);//获得今天本班课程Cid LabelCid.Text = myCid; if (myCid != "") { LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); LabelCtitle.Text = cbll.GetTitle(Int32.Parse(myCid));//获得课程标题 } } }