Beispiel #1
0
 protected void Btnset_Click(object sender, EventArgs e)
 {
     if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
     {
         string             Hid    = tcook.Hid.ToString();
         int                Rhid   = Int32.Parse(Hid);//教师编号
         int                Rgrade = Int32.Parse(DDLgrade.SelectedValue);
         int                Rclass = Int32.Parse(DDLclass.SelectedValue);
         LearnSite.BLL.Room rm     = new LearnSite.BLL.Room();
         string             cid    = DDLCid.SelectedValue;
         if (!string.IsNullOrEmpty(cid))
         {
             rm.UpdateRcid(Rgrade, Rclass, Int32.Parse(cid));
         }
         if (LearnSite.Common.XmlHelp.LoginMode() == 1) //如果是0,个人模式,1为班级模式
         {
             int pwdlen = 3;
             TBpwd.Text    = rm.TeachingRoomSet(Rhid, Rgrade, Rclass, pwdlen);//返回班级密码
             TBpwd.ToolTip = "班级模式下学生登录的密码!";
         }
         else
         {
             TBpwd.Text = "个人模式";
             int pwdlen = 6;
             rm.TeachingRoomSet(Rhid, Rgrade, Rclass, pwdlen);//设置一下配合黄池祥老师的管理软件
             TBpwd.ToolTip = "学生登录请使用自己的个人密码!";
         }
         Session[Hid + "grade"]     = DDLgrade.SelectedValue;
         Session[Hid + "StartTime"] = DateTime.Now.ToString();
         Btnset.Enabled             = false;
         DDLgrade.Enabled           = false;
         DDLclass.Enabled           = false;
         DDLhouse.Enabled           = false;
         Btnstudent.Enabled         = true;
         Btnrefresh.Enabled         = true;
         LearnSite.BLL.Students stu = new LearnSite.BLL.Students();
         stu.ThisClassTeamScoresNew(Rgrade, Rclass);//批量更新group新方法
         ShowNoSigin();
         DDLCid.Enabled = false;
         LearnSite.BLL.Survey vbll = new LearnSite.BLL.Survey();
         vbll.SetClose(Rhid);//开始上课时,先将测验处于关闭状态
     }
 }
Beispiel #2
0
 protected void Btnset_Click(object sender, EventArgs e)
 {
     if (Request.Cookies["TeacherCookies"] != null)
     {
         int Rhid = Int32.Parse(Request.Cookies["TeacherCookies"].Values["Hid"].ToString());//教师编号
         int Rgrade = Int32.Parse(DDLgrade.SelectedValue);
         int Rclass = Int32.Parse(DDLclass.SelectedValue);
         LearnSite.BLL.Room rm = new LearnSite.BLL.Room();
         TBpwd.Text = rm.TeachingRoomSet(Rhid, Rgrade, Rclass);
         string Hid = Request.Cookies["TeacherCookies"].Values["Hid"].ToString();
         Session[Hid+"SetClassPwd"] = TBpwd.Text;
         Session[Hid+"Setgrade"] = DDLgrade.SelectedValue;
         Session[Hid+"Setclass"] = DDLclass.SelectedValue;
         Session[Hid+"RefreshCount"] = 0;
         Btnset.Enabled = false;
         DDLgrade.Enabled = false;
         DDLclass.Enabled = false;
         Btnstudent.Enabled = true;
         Btnrefresh.Enabled = true;
         Btnworkshow.Enabled = true;
     }
 }