private void showSummary() { if (Request.QueryString["Scid"] != null) { int Sgrade = cook.Sgrade; int Sclass = cook.Sclass; int Scid = Int32.Parse(Request.QueryString["Scid"].ToString()); LearnSite.Model.Summary smodel = new LearnSite.Model.Summary(); LearnSite.BLL.Summary sbll = new LearnSite.BLL.Summary(); int hid = cook.Rhid; smodel = sbll.GetModelByClass(Scid, hid, Sgrade, Sclass); LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); Label1.Text = cbll.GetTitle(Scid); if (smodel != null) { contentstr = HttpUtility.HtmlDecode(smodel.Scontent); Label6.Text = smodel.Sdate.ToString(); ButtonEdit.Text = "保存修改"; ButtonEdit.ToolTip = smodel.Sid.ToString();//临时保存要修改的总结ID } else { ButtonEdit.Text = "添加总结"; ButtonEdit.ToolTip = ""; } int Syear = cook.Syear; string Snum = cook.Snum; string teasnum = "s" + hid + Syear.ToString() + Sgrade.ToString() + Sclass.ToString(); if (teasnum == Snum) { ButtonEdit.Enabled = true; } } }
private void showSummary() { if (Request.QueryString["Scid"] != null) { LearnSite.Model.Cook cook = new LearnSite.Model.Cook(); int Sgrade = cook.Sgrade; int Sclass = cook.Sclass; int Scid = Int32.Parse(Request.QueryString["Scid"].ToString()); LearnSite.Model.Summary smodel = new LearnSite.Model.Summary(); LearnSite.BLL.Summary sbll = new LearnSite.BLL.Summary(); int hid = cook.Rhid; if (hid != 0) { LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); Label1.Text = cbll.GetTitle(Scid); smodel = sbll.GetModelByClass(Scid, hid, Sgrade, Sclass); if (smodel != null) { // LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission(); if (smodel.Sshow.Value) { contents.InnerHtml = HttpUtility.HtmlDecode(smodel.Scontent); } else { contents.InnerHtml = "隐藏内容!"; } Label6.Text = smodel.Sdate.ToString(); } else { contents.InnerHtml = "老师还未填写总结!"; } } int Syear = cook.Syear; string Snum = cook.Snum; string teasnum = "s" + hid + Syear.ToString() + Sgrade.ToString() + Sclass.ToString(); if (teasnum == Snum) { BtnEdit.Enabled = true; BtnEdit.ToolTip = "修改或添加总结!"; } } }
private void showSummary() { if (Request.QueryString["Scid"] != null) { int Sgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString()); int Sclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString()); int Scid = Int32.Parse(Request.QueryString["Scid"].ToString()); LearnSite.Model.Summary smodel = new LearnSite.Model.Summary(); LearnSite.BLL.Summary sbll = new LearnSite.BLL.Summary(); string hid = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Rhid"].ToString(); if (!string.IsNullOrEmpty(hid)) { LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); Label1.Text = cbll.GetTitle(Scid); smodel = sbll.GetModelByClass(Scid, Int32.Parse(hid), Sgrade, Sclass); if (smodel != null) { // LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission(); if (smodel.Sshow.Value) { contents.InnerHtml = HttpUtility.HtmlDecode(smodel.Scontent); } else { contents.InnerHtml = "隐藏内容!"; } Label6.Text = smodel.Sdate.ToString(); } else { contents.InnerHtml = "老师还未填写总结!"; } } string Syear = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Syear"].ToString(); string Snum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString(); string teasnum = "s" + hid + Syear + Sgrade.ToString() + Sclass.ToString(); if (teasnum == Snum) { BtnEdit.Enabled = true; BtnEdit.ToolTip = "修改或添加总结!"; } } }