protected void BtnScratch_Click(object sender, EventArgs e) { int Qgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString()); int Qclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString()); string Wcid = Request.QueryString["Cid"].ToString(); string Wmid = Request.QueryString["Mid"].ToString(); string url = "~/Student/programing.aspx?Mid=" + Wmid + "&Cid=" + Wcid; string Snum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString(); if (Snum.StartsWith("s")) { Response.Redirect(url); } else { LearnSite.BLL.Room bll = new LearnSite.BLL.Room(); bool isBegin = bll.IsRscratch(Qgrade, Qclass); if (isBegin) { Response.Redirect(url); } else { LearnSite.Common.WordProcess.Alert("编程未开始,请仔细听讲技术关键点!", this.Page); } } }
protected void BtnBegin_Click(object sender, EventArgs e) { int Qgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString()); int Qclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString()); LearnSite.BLL.Room bll = new LearnSite.BLL.Room(); bool isBegin = bll.IsRscratch(Qgrade, Qclass); if (isBegin) { bll.updateRscratch(Qgrade, Qclass, false); Labelscratch.Text = "编程未开始!"; } else { Labelscratch.Text = "编程已开始!"; bll.updateRscratch(Qgrade, Qclass, true); } }
protected void BtnBegin_Click(object sender, EventArgs e) { int Qgrade = cook.Sgrade; int Qclass = cook.Sclass; LearnSite.BLL.Room bll = new LearnSite.BLL.Room(); bool isBegin = bll.IsRscratch(Qgrade, Qclass); if (isBegin) { bll.updateRscratch(Qgrade, Qclass, false); Labelscratch.Text = "编程未开始!"; } else { Labelscratch.Text = "编程已开始!"; bll.updateRscratch(Qgrade, Qclass, true); } }