private void ReadMtitle() { if (Request.QueryString["Mi"] != null) { int Mid = Int32.Parse(Request.QueryString["Mi"].ToString()); LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission(); LabeMtitle.Text = "〖" + mbll.GetMissionTitle(Mid) + "〗"; } }
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 GetScore(string Wmid, string mySnum) { if (!string.IsNullOrEmpty(Wmid)) { string Wcid = Request.QueryString["Cid"].ToString(); LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission(); LabelMtitle.Text = mbll.GetMissionTitle(Int32.Parse(Wmid)); LearnSite.BLL.Works ws = new LearnSite.BLL.Works(); string[] myscoreself = ws.GetmyScoreWself(Wcid, Wmid, mySnum); string myscore = myscoreself[0].ToString(); TextBoxWself.Text = myscoreself[1].ToString(); TextBoxWdsocre.Text = myscoreself[2].ToString(); if (myscore != "") { int ascore = Int32.Parse(myscore); switch (ascore) { case 12: RBLselect.SelectedValue = "G"; break; case 10: RBLselect.SelectedValue = "A"; break; case 8: RBLselect.SelectedValue = "B"; break; case 6: RBLselect.SelectedValue = "C"; break; case 4: RBLselect.SelectedValue = "D"; break; case 2: RBLselect.SelectedValue = "E"; break; case 0: RBLselect.SelectedValue = "O"; break; } } } }
private void showGroups() { if (Request.QueryString["Sg"] != null && Request.QueryString["Sc"] != null) { int sgrade = Int32.Parse(Request.QueryString["Sg"].ToString()); int sclass = Int32.Parse(Request.QueryString["Sc"].ToString()); LearnSite.BLL.Students sbll = new LearnSite.BLL.Students(); DLgroups.DataSource = sbll.ClassGroup(sgrade, sclass); DLgroups.DataBind(); int mid = Int32.Parse(Request.QueryString["Mi"].ToString()); LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission(); LabeMtitle.Text = "《" + mbll.GetMissionTitle(mid) + "》" + sgrade.ToString() + "." + sclass.ToString() + "班小组作品展示"; } }
private void ShowWork() { string Studentnum = Request.Cookies["StudentCookies"].Values["Snum"].ToString(); string Wfilename, Wfiletype, Wurl, Wip; string Wid = Request.QueryString["Wid"].ToString(); if (LearnSite.Common.WordProcess.IsNum(Wid)) { LearnSite.Model.Works wmodel=new LearnSite.Model.Works(); LearnSite.BLL.Works ws = new LearnSite.BLL.Works(); wmodel=ws.GetModel(Int32.Parse(Wid)); LabelWnum.Text = wmodel.Wnum; Wfilename = wmodel.Wfilename; Wurl = wmodel.Wurl; Wfiletype = LearnSite.Common.FileDown.FileNameExtension(Wurl); string typestr = Wfiletype.Substring(1, Wfiletype.Length - 1); ImageType.ImageUrl = "~/Images/FileType/" + typestr.ToLower() + ".gif"; Labelself.Text = HttpUtility.HtmlDecode(wmodel.Wself); Labelsdate.Text = wmodel.Wdate.ToString(); Labellength.Text = wmodel.Wlength.ToString() + "字节"; Labelfilename.Text = wmodel.Wfilename; LabelWscore.Text = wmodel.Wscore.ToString()+"分"; Wip = wmodel.Wip; TimeSpan ts = DateTime.Now - DateTime.Parse(Labelsdate.Text); Labelspan.Text = ts.Days.ToString() + " 天 "; Session[Studentnum+"Wurl"] = Wurl; string worknum = wmodel.Wnum; string LoginIp = Request.Cookies["StudentCookies"].Values["LoginIp"].ToString(); int days =Int32.Parse( LearnSite.Common.XmlHelp.GetWorkDowntime());//获取作品查看天数 HyperLinkreturn.NavigateUrl = "~/Student/myvote.aspx?Wid=" + Wid + "&Wcid=" + wmodel.Wcid.ToString() + "&Wmsort="+wmodel.Wmsort.ToString(); LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission(); Labelmission.Text = mbll.GetMissionTitle(wmodel.Wmid.Value); if (Wip == LoginIp && worknum==Studentnum) { LBtnfile.Visible = true; if (Labelself.Text != "") { Btnword.Text = "修改自评"; } else { Btnword.Text = "添加自评"; } } else { if (ts.Days > days) { Btnword.Text = "添加互评"; LBtnfile.Visible = true; } else { Labelmsg.Text = days.ToString()+"天后可查看"; LBtnfile.Visible = false; } } //Labelmsg.Text = Wurl; } }