Beispiel #1
0
 protected void BtnType_Click(object sender, EventArgs e)
 {
     string Psnum = Request.Cookies["StudentCookies"].Values["Snum"].ToString();
     string Pip = Request.Cookies["StudentCookies"].Values["LoginIp"].ToString();
     int Sgrade = Int32.Parse(Request.Cookies["StudentCookies"].Values["Sgrade"].ToString());
     int Sclass = Int32.Parse(Request.Cookies["StudentCookies"].Values["Sclass"].ToString());
     bool workiplimit = LearnSite.Common.XmlHelp.GetWorkIpLimit();
     if (workiplimit)
     {
         LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper();
         if (!pbll.ExistPtyper(Psnum, Sgrade, Sclass, Pip))
         {
             SaveTypeRecord(Psnum, Pip);
         }
         else
         {
             Labelmsg.Text = "同班只能使用一个账号在本电脑上打字!";
         }
     }
     else
     {
         SaveTypeRecord(Psnum, Pip);
     }
 }