protected void Page_Load(object sender, EventArgs e) { LearnSite.Common.CookieHelp.JudgeTeacherCookies(); ImageBtnDel.Attributes["OnClick"] = "return confirm('您确定要删除该作品吗?');"; if (!IsPostBack) { if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null) { if (Request.QueryString["Cid"] != null) { int Wcid = Int32.Parse(Request.QueryString["Cid"].ToString()); LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); string ctitle = cbll.GetTitle(Wcid); LabeCtitle.Text = "《" + ctitle + "》"; Master.Page.Title = LearnSite.Common.CookieHelp.SetMainPageTitle() + "《" + ctitle + "》未评作品列表页面"; ShowClass(); Readwork(); showflash(); } else { Response.Redirect("~/Teacher/works.aspx", false); } } } }
private void showtopic() { if (Request.QueryString["Tid"] != null) { int tid = Int32.Parse(Request.QueryString["Tid"].ToString()); LearnSite.BLL.TopicDiscuss tbll = new LearnSite.BLL.TopicDiscuss(); LearnSite.Model.TopicDiscuss tmodel = new LearnSite.Model.TopicDiscuss(); tmodel = tbll.GetModel(tid);//获取主题讨论实体 Labeltopic.Text = tmodel.Ttitle; TcloseCheck.Checked = tmodel.Tclose; Topics.InnerHtml = "<br/> 讨论内容:" + HttpUtility.HtmlDecode(tmodel.Tcontent); LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); Labelcourse.Text = cbll.GetTitle(tmodel.Tcid.Value);//获取学案名称 LearnSite.BLL.TopicReply rbll = new LearnSite.BLL.TopicReply(); TopicsResult.InnerHtml = "<br/> 老师总结:"; if (tmodel.Tclose) { Btnword.Enabled = false;//不可发表讨论 Btnclock.ImageUrl = "~/Images/clockred.gif" + "?temp=" + DateTime.Now.Millisecond.ToString(); Btnclock.ToolTip = "当前主题讨论关闭!"; } else { Btnword.Enabled = true;//可发表讨论 Btnclock.ImageUrl = "~/Images/clock.gif" + "?temp=" + DateTime.Now.Millisecond.ToString(); Btnclock.ToolTip = "当前主题讨论开启!"; } } }
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 showWorks() { string midselect = Rblmission.SelectedValue; string cidselect = Rblcourse.SelectedValue; if (!string.IsNullOrEmpty(midselect) && !string.IsNullOrEmpty(cidselect)) { string yearselect = Rblyear.SelectedValue; string gradeselect = Rblgrade.SelectedValue; string classselect = Rblclass.SelectedValue; string termselect = Rblterm.SelectedValue; string displaymodel = Rbldisplay.SelectedValue; LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); string ctitle = cbll.GetTitle(Int32.Parse(cidselect)); LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission(); string mtitle = mbll.GetMissionTitle(Int32.Parse(midselect)); LabelTitle.Text = "【" + ctitle + "】" + mtitle; LearnSite.BLL.Works wbll = new LearnSite.BLL.Works(); switch (displaymodel) { case "1": DLworks.DataSource = wbll.ShowWclassWorks(Int32.Parse(yearselect), Int32.Parse(gradeselect), Int32.Parse(classselect), Int32.Parse(termselect), Int32.Parse(midselect)); DLworks.DataBind(); divlist.Visible = true; divview.Visible = false; Literal1.Visible = false; break; case "2": DDLstore.DataSource = wbll.ShowWclassWorks(Int32.Parse(yearselect), Int32.Parse(gradeselect), Int32.Parse(classselect), Int32.Parse(termselect), Int32.Parse(midselect)); DDLstore.DataTextField = "Wname"; DDLstore.DataValueField = "Wurl"; DDLstore.DataBind(); divlist.Visible = false; divview.Visible = true; Literal1.Visible = true; if (DDLstore.Items.Count > 0) { DDLstore.SelectedIndex = 0; showflash(); } break; } } else { LabelTitle.Text = "没有作品!"; divlist.Visible = false; divview.Visible = false; Literal1.Visible = false; } }
private void Showthink() { if (Request.QueryString["Cid"] != null) { string Fcid = Request.QueryString["Cid"].ToString(); LearnSite.Model.Flection flection = new LearnSite.Model.Flection(); LearnSite.BLL.Flection flectionbll = new LearnSite.BLL.Flection(); flection = flectionbll.GetModel(Int32.Parse(Fcid)); LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses(); Texttitle.Text = cs.GetTitle(Int32.Parse(Fcid)); mcontent.InnerText = HttpUtility.HtmlDecode(flection.Fcontent); } }
private void Showthink() { if (Request.QueryString["Cid"] != null) { string Fcid = Request.QueryString["Cid"].ToString(); LearnSite.Model.Flection flection = new LearnSite.Model.Flection(); LearnSite.BLL.Flection flectionbll = new LearnSite.BLL.Flection(); flection = flectionbll.GetModel(Int32.Parse(Fcid)); LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses(); Texttitle.Text = cs.GetTitle(Int32.Parse(Fcid)); FCKeditor1.Value = HttpUtility.HtmlDecode(flection.Fcontent); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.Page.Title = "课后讨论"; } if (Request.QueryString["Cid"] != null) { string Cid = Request.QueryString["Cid"].ToString(); LearnSite.Store.CourseStore.FCKUserFilesPath(Cid); LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses(); Texttitle.Text = cs.GetTitle(Int32.Parse(Cid)); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null) { if (Request.QueryString["Cid"] != null) { string Cid = Request.QueryString["Cid"].ToString(); LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses(); Texttitle.Text = cs.GetTitle(Int32.Parse(Cid)); } } } }
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 = "修改或添加总结!"; } } }
private void ShowCid() { Labelshow.Text = Request.QueryString["Grade"].ToString() + "年级"; Labeltxt.Text = "班---作品展示"; int Sgrade = Int32.Parse(Request.QueryString["Grade"].ToString()); string myCid = Request.QueryString["Cid"].ToString();//直接url传递 string cterm = LearnSite.Common.XmlHelp.GetTerm(); LearnSite.BLL.Room rm = new LearnSite.BLL.Room(); DDLclass.DataSource = rm.GetLimitClass(Sgrade); DDLclass.DataTextField = "Rclass"; DDLclass.DataValueField = "Rclass"; DDLclass.DataBind(); LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); Labeltitle.Text = cbll.GetTitle(Int32.Parse(myCid)); ShowUploadMsort(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null) { if (Request.QueryString["Cid"] != null) { LabelCid.Text = Request.QueryString["Cid"].ToString(); int Cid = Int32.Parse(Request.QueryString["Cid"]); LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); LabelCtitle.Text = cbll.GetTitle(Cid);//显示标题 ShowPackage(); showfilelist(); } } } }
protected void Page_Load(object sender, EventArgs e) { LearnSite.Common.CookieHelp.JudgeTeacherCookies(); if (!IsPostBack) { Master.Page.Title = LearnSite.Common.CookieHelp.SetMainPageTitle() + "学案删除页面"; if (Request.QueryString["Cid"] != null) { LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); LabelID.Text = cbll.GetTitle(Int32.Parse(Request.QueryString["Cid"].ToString())); ButtonDel.Enabled = true; } else { ButtonDel.Enabled = false; } } }
private void ShowThink() { if (Request.QueryString["Cid"] != null) { int Fcid =Int32.Parse( Request.QueryString["Cid"].ToString()); LearnSite.BLL.Flection flection = new LearnSite.BLL.Flection(); if (flection.ExistsFcid(Fcid)) { Repeater1.DataSource = flection.GetListCid(Fcid); Repeater1.DataBind(); LearnSite.BLL.Courses cs=new LearnSite.BLL.Courses(); LabelTitle.Text = cs.GetTitle(Fcid); } else { string url = "~/Lessons/thinkadd.aspx?Cid=" + Fcid ; Response.Redirect(url, false); } } }
private void ShowThink() { if (Request.QueryString["Cid"] != null) { int Fcid = Int32.Parse(Request.QueryString["Cid"].ToString()); LearnSite.BLL.Flection flection = new LearnSite.BLL.Flection(); if (flection.ExistsFcid(Fcid)) { Repeater1.DataSource = flection.GetListCid(Fcid); Repeater1.DataBind(); LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses(); LabelTitle.Text = cs.GetTitle(Fcid); } else { string url = "~/Lessons/thinkadd.aspx?Cid=" + Fcid; Response.Redirect(url, false); } } }
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));//获得课程标题 } } }
private void showtotal() { string cidSelect = DDLCid.SelectedValue; if (!string.IsNullOrEmpty(cidSelect)) { DateTime dt1 = DateTime.Now; int Sgrade = Int32.Parse(Request.QueryString["wGrade"].ToString()); int Sclass = Int32.Parse(Request.QueryString["wClass"].ToString()); int Cid = Int32.Parse(cidSelect); LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); string Ctitle = cbll.GetTitle(Cid); DataTable dt = cbll.CourseTotals(Cid, Sgrade, Sclass); string clm = RBsort.SelectedValue; if (dt.Columns.Contains("汇总")) { if (clm == "汇总") { dt.DefaultView.Sort = clm + " desc"; } else { dt.DefaultView.Sort = clm + " asc"; } } else { dt.DefaultView.Sort = " 学号 asc"; } GridViewclass.DataSource = dt.DefaultView.ToTable(); GridViewclass.DataBind(); LearnSite.BLL.Students sbll = new LearnSite.BLL.Students(); DataTable dtg = sbll.groupscores(Sgrade, Sclass, dt, Cid); string sl = RBsortGroup.SelectedValue; switch (sl) { case "0": break; //默认排序 case "1": dtg.DefaultView.Sort = "Sgscore desc,Svscore desc"; break; case "2": dtg.DefaultView.Sort = "Svscore desc,Sgscore desc"; break; case "3": dtg.DefaultView.Sort = "Sgwork desc,Svscore desc,Sgscore desc"; break; case "4": dtg.DefaultView.Sort = "Sgattitude desc,Sgwork desc,Svscore desc,Sgscore desc"; break; //Sgattitude } DataList1.DataSource = dtg.DefaultView.ToTable(); DataList1.DataBind(); if (DataList1.Items.Count == 0) { RBsortGroup.Visible = false; } dtg.Dispose(); dt.Dispose();//强制释放 DateTime dt2 = DateTime.Now; Labelmsg.Text = "汇总费时:" + LearnSite.Common.Computer.DatagoneMilliseconds(dt1, dt2) + "毫秒"; this.Page.Title = LabelGradeClass.Text + "《" + DDLCid.SelectedItem.Text + "》学习汇总"; } }
private void ShowListMenu() { if (Request.QueryString["Cid"] != null) { string Cid = Request.QueryString["Cid"].ToString(); string Uploadmode = LearnSite.Common.XmlHelp.GetUploadMode(); if (LearnSite.Common.WordProcess.IsNum(Cid)) { string CurWay = ""; LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); string Ctitle = cbll.GetTitle(Int32.Parse(Cid)); AddLessonFirst(CurWay, Cid); LearnSite.BLL.ListMenu lbll = new LearnSite.BLL.ListMenu(); DataTable dt = lbll.GetShowedMenu(Int32.Parse(Cid)).Tables[0]; int dcount = dt.Rows.Count; if (dcount > 0) { string myLid = ""; if (Request.QueryString["Lid"] != null) { myLid = Request.QueryString["Lid"].ToString(); } for (int i = 0; i < dcount; i++) { string Lid = dt.Rows[i]["Lid"].ToString(); string Lsort = dt.Rows[i]["Lsort"].ToString(); string Ltype = dt.Rows[i]["Ltype"].ToString(); string Lxidstr = dt.Rows[i]["Lxid"].ToString(); string Ltitlestr = dt.Rows[i]["Ltitle"].ToString(); MenuItem ma = new MenuItem(); ma.Text = Ltitlestr; ma.SeparatorImageUrl = "~/Images/separate.png"; switch (Ltype) { case "1": //活动 ma.ImageUrl = "~/Images/mission.png"; ma.NavigateUrl = "~/Lessons/premission.aspx?Cid=" + Cid + "&Mid=" + Lxidstr + "&Lid=" + Lid + "&Lsort=" + Lsort; break; case "2": //调查 ma.ImageUrl = "~/Images/survey.png"; ma.NavigateUrl = "~/Lessons/presurvey.aspx?Cid=" + Cid + "&Vid=" + Lxidstr + "&Lid=" + Lid + "&Lsort=" + Lsort; break; case "3": //讨论 ma.ImageUrl = "~/Images/topic.png"; ma.NavigateUrl = "~/Lessons/pretopicdiscuss.aspx?Cid=" + Cid + "&Tid=" + Lxidstr + "&Lid=" + Lid + "&Lsort=" + Lsort; break; } if (myLid == Lid) { CurWay = Ltitlestr; ma.Selected = true; } Menuact.Items.Add(ma);//添加活动菜单 } } dt.Dispose(); AddReturn(); this.Page.Title = Ctitle + "—>" + CurWay; } } }
private void ShowListMenu() { if (Request.QueryString["Cid"] != null) { string Cid = Request.QueryString["Cid"].ToString(); string Uploadmode = LearnSite.Common.XmlHelp.GetUploadMode(); if (LearnSite.Common.WordProcess.IsNum(Cid)) { string mUrl; if (Uploadmode == "0") { mUrl = "active"; } else { mUrl = "mission"; } string CurWay = ""; LearnSite.BLL.Courses cbll = new LearnSite.BLL.Courses(); string Ctitle = cbll.GetTitle(Int32.Parse(Cid)); AddLessonFirst(CurWay, Cid); LearnSite.BLL.ListMenu lbll = new LearnSite.BLL.ListMenu(); DataTable dt = lbll.GetShowedMenu(Int32.Parse(Cid)).Tables[0]; int dcount = dt.Rows.Count; if (dcount > 0) { string myLid = ""; if (Request.QueryString["Lid"] != null) { myLid = Request.QueryString["Lid"].ToString(); } for (int i = 0; i < dcount; i++) { string Lid = dt.Rows[i]["Lid"].ToString(); string Lsort = dt.Rows[i]["Lsort"].ToString(); string Ltype = dt.Rows[i]["Ltype"].ToString(); string Lxidstr = dt.Rows[i]["Lxid"].ToString(); string Ltitlestr = dt.Rows[i]["Ltitle"].ToString(); MenuItem ma = new MenuItem(); ma.Text = Ltitlestr; ma.SeparatorImageUrl = "~/Images/separate.gif"; switch (Ltype) { case "1": //活动 ma.ImageUrl = "~/Images/mission.png"; ma.NavigateUrl = "~/Student/show" + mUrl + ".aspx?Cid=" + Cid + "&Mid=" + Lxidstr + "&Lid=" + Lid + "&Lsort=" + Lsort; break; case "2": //调查 ma.ImageUrl = "~/Images/survey.png"; ma.NavigateUrl = "~/Student/mysurvey.aspx?Cid=" + Cid + "&Vid=" + Lxidstr + "&Lid=" + Lid + "&Lsort=" + Lsort; break; case "3": //讨论 ma.ImageUrl = "~/Images/topic.png"; ma.NavigateUrl = "~/Student/topicdiscuss.aspx?Cid=" + Cid + "&Tid=" + Lxidstr + "&Lid=" + Lid + "&Lsort=" + Lsort; break; case "4": //表单 ma.ImageUrl = "~/Images/inquiry.png"; ma.NavigateUrl = "~/Student/txtform.aspx?Cid=" + Cid + "&Mid=" + Lxidstr + "&Lid=" + Lid + "&Lsort=" + Lsort; break; case "5": //编程 ma.ImageUrl = "~/Images/program.png"; ma.NavigateUrl = "~/Student/program.aspx?Cid=" + Cid + "&Mid=" + Lxidstr + "&Lid=" + Lid + "&Lsort=" + Lsort; break; case "6": //描述 ma.ImageUrl = "~/Images/description.png"; ma.NavigateUrl = "~/Student/description.aspx?Cid=" + Cid + "&Mid=" + Lxidstr + "&Lid=" + Lid + "&Lsort=" + Lsort; break; } if (myLid == Lid) { CurWay = Ltitlestr; ma.Selected = true; } Menuact.Items.Add(ma);//添加活动菜单 } } dt.Dispose(); AddReturn(); string stuName = ""; if (Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname] != null) { LearnSite.Model.Cook cook = new LearnSite.Model.Cook(); stuName = cook.Sname; } this.Page.Title = HttpUtility.UrlDecode(stuName) + " " + Ctitle + "—>" + CurWay; } } }