private void ShowIpWorkDone() { string Sname = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sname"].ToString(); string Snum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString(); string Wcid = Request.QueryString["Cid"].ToString(); string Wmid = Request.QueryString["Mid"].ToString(); VoteLink.NavigateUrl = "~/Student/myevaluate.aspx?Mid=" + Wmid + "&Cid=" + Wcid; LearnSite.BLL.Works bll = new LearnSite.BLL.Works(); LearnSite.Model.Works work = new LearnSite.Model.Works(); work = bll.GetModelByStu(Int32.Parse(Wmid), Snum); BtnScratch.Text = "开始编写"; Thumbnail.ImageUrl = "~/Images/thumbnail.png"; if (work != null) { string Wurl = work.Wurl; string Wthumbnail = work.Wthumbnail; if (!string.IsNullOrEmpty(Wthumbnail)) { Thumbnail.ImageUrl = Wthumbnail + "?temp=" + DateTime.Now.Millisecond.ToString(); Wtitle.Text = HttpUtility.HtmlDecode(work.Wtitle); string urlid = work.Wid.ToString(); Thumbnail.Attributes["OnClick"] = "scratchShare(" + urlid + ")"; } bool IsCheck = work.Wcheck; if (IsCheck) { Labelmsg.Text = "您的作品已评分!<br/>您不可以重新编写!"; BtnScratch.Visible = false; } else { Labelmsg.Text = "您的作品还未评分!<br/>您可以重新修改提交!"; BtnScratch.Text = "继续编写"; } } if (Snum.StartsWith("s")) { BtnBegin.Visible = true; } else { BtnBegin.Visible = false; } }
/// <summary> /// 显示信息 /// </summary> private void ShowInfo() { string Studentnum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString(); int MySgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString()); int MySclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString()); int MySyear = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Syear"].ToString()); int MySgroup = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgroup"].ToString()); if (MySgroup == 0) { Labelscope.Text = "全班"; } else { Labelscope.Text = "组内"; } string Mid = Request.QueryString["Mid"].ToString(); if (LearnSite.Common.WordProcess.IsNum(Mid)) { LearnSite.Model.Works wmodel = new LearnSite.Model.Works(); LearnSite.BLL.Works ws = new LearnSite.BLL.Works(); LearnSite.BLL.Mission mbll = new LearnSite.BLL.Mission(); LearnSite.Model.Mission mModel = new LearnSite.Model.Mission(); mModel = mbll.GetModel(Int32.Parse(Mid)); ImageWtype.ImageUrl = "~/Images/FileType/" + mModel.Mfiletype + ".gif"; Labelmtitle.Text = "〖" + mModel.Mtitle + "〗"; LabelMgid.Text = mModel.Mgid.ToString(); Labelwmid.Text = Mid; LabelWtype.Text = mModel.Mfiletype; wmodel = ws.GetModelByStu(Int32.Parse(Mid), Studentnum); if (wmodel != null) { DataListvote.DataSource = ws.ShowMissionWorksGroup(MySgrade, MySclass, Int32.Parse(Mid), MySgroup); DataListvote.DataBind(); Labelhow.Text = DataListvote.Items.Count.ToString(); Labelme.Text = wmodel.Wvote.ToString(); string workIp = wmodel.Wip; string worknum = wmodel.Wnum; DateTime workdate = wmodel.Wdate.Value; DateTime nowdate = DateTime.Now; bool worklimit = LearnSite.Common.XmlHelp.GetWorkIpLimit(); Labelegg.Text = wmodel.Wegg.ToString(); Labelwfscore.Text = wmodel.Wfscore.ToString(); TimeSpan ts = nowdate - workdate; int lastday = ts.Days; Labelwdate.Text = lastday.ToString();///取短日期 if (lastday < 30) { if (showRgaugeSet()) { LimitVote();//限制为可预览的投票 } else { Labelmsg.Text = "当前作品互评暂停!"; BtnVote.Enabled = false; } } else { Labelmsg.Text = "一个月前的作品不能再投票了!"; BtnVote.Enabled = false; } } else { if (Studentnum.StartsWith("s")) { DataListvote.DataSource = ws.ShowMissionWorksGroup(MySgrade, MySclass, Int32.Parse(Mid), MySgroup); DataListvote.DataBind(); Labelhow.Text = DataListvote.Items.Count.ToString(); BtnVote.Enabled = true; } else { Labelmsg.Text = "您未提交作品,无法互评!"; BtnVote.Enabled = false; } } } }