Esempio n. 1
0
    /// <summary>
    /// 显示本班级已学和未学学案
    /// </summary>
    private void Showkc()
    {
        int Rhid   = tcook.Hid;
        int Rgrade = Int32.Parse(DDLgrade.SelectedValue);
        int Rclass = Int32.Parse(DDLclass.SelectedValue);

        LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
        int Syear = sbll.GetYear(Rgrade, Rclass);

        LearnSite.BLL.Works wbll = new LearnSite.BLL.Works();
        int    Wterm             = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
        string Wcids             = wbll.ShowDoneWorkCids(Rgrade, Rclass, Wterm, Syear);

        LearnSite.BLL.TopicReply Tbll = new LearnSite.BLL.TopicReply();
        string Tcids = Tbll.ShowDoneReplyCids(Rgrade, Rclass, Wterm, Syear);

        LearnSite.BLL.SurveyFeedback fbll = new LearnSite.BLL.SurveyFeedback();
        string Fcids   = fbll.ShowFeedbackCids(Rgrade, Rclass, Wterm, Syear);
        string allCids = Wcids + Tcids + Fcids;

        allCids = LearnSite.Common.WordProcess.SimpleWords(allCids);
        LearnSite.BLL.Courses cs = new LearnSite.BLL.Courses();
        DLdonekc.DataSource = cs.ShowClassDoneCourse(Rgrade, Rhid, allCids);
        DLdonekc.DataBind();
        DLnewkc.DataSource = cs.ShowClassnewCourse(Rgrade, Rhid, allCids);
        DLnewkc.DataBind();
    }
Esempio n. 2
0
    protected void GVgroup_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName.Equals("AddGroup"))
        {
            string sid = e.CommandArgument.ToString();
            LearnSite.BLL.Students bll  = new LearnSite.BLL.Students();
            int                sgrade   = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
            int                sclass   = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString());
            int                mysid    = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sid"].ToString());
            string             snum     = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString();
            int                groupmax = 6;
            LearnSite.BLL.Room rbll     = new LearnSite.BLL.Room();
            groupmax = rbll.GetRgroupMax(sgrade, sclass); // LearnSite.Common.XmlHelp.GetGroupMax();

            if (bll.GetGroupCount(sgrade, sclass, Int32.Parse(sid)) < groupmax + 1)
            {
                bll.AddThisGroup(snum, Int32.Parse(sid));//每小组人数少于小组上限则可参加
                System.Threading.Thread.Sleep(500);
                showGroup();
            }
            else
            {
                string ch = "小组人数已满" + groupmax + "位,请参加其他小组!";
                LearnSite.Common.WordProcess.Alert(ch, this.Page);
            }
        }
    }
Esempio n. 3
0
 protected void GVGroups_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowIndex > -1)
     {
         int      sid                = Convert.ToInt32(GVGroups.DataKeys[e.Row.RowIndex].Value);
         int      sgrade             = Int32.Parse(Request.QueryString["Sgrade"].ToString());
         int      sclass             = Int32.Parse(Request.QueryString["Sclass"].ToString());
         DataList dl                 = (DataList)e.Row.Cells[3].FindControl("DLgstu");
         LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
         if (dl != null)
         {
             dl.DataSource = sbll.GroupMembers(sgrade, sclass, sid);
             dl.DataBind();
         }
         Label lb = (Label)e.Row.FindControl("LabelSscores");
         lb.Text = sbll.MyGroupSscores(sgrade, sclass, sid);
     }
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         //当鼠标放上去的时候 先保存当前行的背景颜色 并给附一颜色
         e.Row.Attributes.Add("onmouseover", "currentcolor=this.style.backgroundColor;this.style.backgroundColor='#E1E8E1',this.style.fontWeight='';");
         //当鼠标离开的时候 将背景颜色还原的以前的颜色
         e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=currentcolor,this.style.fontWeight='';");
         //单击行改变行背景颜色
         e.Row.Attributes.Add("onclick", "this.style.backgroundColor='#D8E0D8'; this.style.color='buttontext';this.style.cursor='default';");
     }
 }
Esempio n. 4
0
    private void ShowStudent()
    {
        int mySid  = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sid"].ToString());
        int Sgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
        int Sclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString());

        Labelip.Text = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["LoginIp"].ToString();
        snum.Text    = Server.UrlDecode(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString());
        sclass.Text  = Sgrade.ToString() + "." + Sclass.ToString() + "班";
        sname.Text   = Server.UrlDecode(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sname"].ToString());
        string ssex = Server.UrlDecode(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sex"].ToString());

        sscore.Text    = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sscore"].ToString();
        sattitude.Text = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sattitude"].ToString();
        LearnSite.BLL.Students dbll = new LearnSite.BLL.Students();
        sleadername.Text = Server.UrlDecode(dbll.GetLeader(mySid));
        string murl = LearnSite.Common.Photo.GetStudentPhotoUrl(snum.Text, ssex);

        Imageface.ImageUrl = murl + "?temp=" + DateTime.Now.Millisecond.ToString();
        LabelRank.Text     = Server.UrlDecode(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["RankImage"].ToString());
        int myscores = int.Parse(sscore.Text);

        LabelRank.ToolTip = "你当前的等级为:" + myscores / 3 + "级";

        LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
        Session["myClassCid"] = rbll.GetRcid(Sgrade, Sclass);
    }
Esempio n. 5
0
    private void ShowStudent()
    {
        LearnSite.Model.Cook cook = new LearnSite.Model.Cook();

        int mySid = cook.Sid;

        LearnSite.BLL.Students dbll = new LearnSite.BLL.Students();
        sleadername.Text = Server.UrlDecode(dbll.GetLeader(mySid));
        string ssex = cook.Sex;
        string murl = LearnSite.Common.Photo.GetStudentPhotoUrl(snum.Text, ssex);

        Imageface.ImageUrl = murl + "?temp=" + DateTime.Now.Millisecond.ToString();

        Labelip.Text = cook.LoginIp;
        snum.Text    = Server.UrlDecode(cook.Snum);
        string Sgrade = cook.Sgrade.ToString();
        string Sclass = cook.Sclass.ToString();

        sclass.Text = Sgrade + "." + Sclass + "班";
        sname.Text  = Server.UrlDecode(cook.Sname);

        sscore.Text    = cook.Sscore.ToString();
        sattitude.Text = cook.Sattitude.ToString();
        LabelRank.Text = Server.UrlDecode(cook.RankImage);
        int myscores = int.Parse(sscore.Text);

        LabelRank.ToolTip = "你当前的等级为:" + myscores / 3 + "级  加速升级中…";
    }
Esempio n. 6
0
 private void ShowStudent()
 {
     int Sid = Int32.Parse(Request.QueryString["Sid"].ToString());
     LearnSite.BLL.Students stu = new LearnSite.BLL.Students();
     Repeater1.DataSource = stu.GetOneStudent(Sid);
     Repeater1.DataBind();
 }
Esempio n. 7
0
    private void ShowStudent()
    {
        int Sid = Int32.Parse(Request.QueryString["Sid"].ToString());

        LearnSite.Model.Students student = new LearnSite.Model.Students();
        LearnSite.BLL.Students   stubll  = new LearnSite.BLL.Students();
        student                = stubll.GetModel(Sid);
        Tsnum.Text             = student.Snum;
        Tsyear.Text            = student.Syear.ToString();
        DDLgrade.SelectedValue = student.Sgrade.ToString();
        myClass(student.Sgrade.Value);//2014-10-28修改 因为初始化的年级获取的班级数不足,所以要获取
        DDLclass.SelectedValue = student.Sclass.ToString();
        Tsname.Text            = student.Sname;
        Tspwd.Text             = student.Spwd;
        DDLsex.SelectedValue   = student.Sex;
        Tsaddress.Text         = student.Saddress;
        Tsphone.Text           = student.Sphone;
        Tsparents.Text         = student.Sparents;
        Tsheadtheacher.Text    = student.Sheadtheacher;
        Tsscore.Text           = student.Sscore.ToString();
        Tsattitude.Text        = student.Sattitude.ToString();
        string Hid = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();

        Session[Hid + "grade"] = DDLgrade.SelectedValue;
        Session[Hid + "class"] = DDLclass.SelectedValue;
    }
Esempio n. 8
0
    protected void LinkBtnDel_Click(object sender, EventArgs e)
    {
        int Sid = Int32.Parse(Request.QueryString["Sid"].ToString());

        LearnSite.BLL.Students stu = new LearnSite.BLL.Students();
        //将删除的学生添加到删除列表中,以便将来恢复
        LearnSite.Model.Students smodel = new LearnSite.Model.Students();
        smodel = stu.GetModel(Sid);//获取要删除的学生实体
        LearnSite.Model.DelStudents dmodel = new LearnSite.Model.DelStudents();
        dmodel.Daddress      = smodel.Saddress;
        dmodel.Dclass        = smodel.Sclass;
        dmodel.Dgrade        = smodel.Sgrade;
        dmodel.Dheadtheacher = smodel.Sheadtheacher;
        dmodel.Dname         = smodel.Sname;
        dmodel.Dnum          = smodel.Snum;
        dmodel.Dparents      = smodel.Sparents;
        dmodel.Dphone        = smodel.Sphone;
        dmodel.Dsex          = smodel.Sex;
        dmodel.Dyear         = smodel.Syear;
        LearnSite.BLL.DelStudents dbll = new LearnSite.BLL.DelStudents();
        dbll.Add(dmodel); //在学生删除表增加该学生

        stu.Delete(Sid);  //学生表中删除该学生
        System.Threading.Thread.Sleep(500);
        string url = "~/Teacher/student.aspx?Sgrade=" + Request.QueryString["Sgrade"].ToString() + "&&Sclass=" + Request.QueryString["Sclass"].ToString();

        Response.Redirect(url, false);
    }
Esempio n. 9
0
 /// <summary>
 /// 先删除学生表中的毕业学生,再删除Ftp用户中的记录,再删除Signin表中的记录, 最后删除Web用户
 /// 学年升级(只是年级改变)不影响Ftp账号使用(因为Ftp账号是根据Syear,Sclass,Snum入学年份、班级、学号创建
 /// Ftp目录也是根据Syear,Sclass,Snum入学年份、班级、学号创建)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Btnupgrade_Click(object sender, EventArgs e)
 {
     LearnSite.BLL.Room rm = new LearnSite.BLL.Room();
     if (rm.GradeCount() > 0)
     {
             DateTime nowtime1 = DateTime.Now;
             LearnSite.BLL.Students st = new LearnSite.BLL.Students();
             if (st.GetCounts() > 0)
             {
                 st.Upgrade();//所有年级升一级,并删除班级表中不存在班级的学生
                 System.Threading.Thread.Sleep(1000);
                 LearnSite.Ftp.Reg.Upgrade();//删除学生表中不存在学号的账号(根据已经清除过的学生表与网页表对比)
                 System.Threading.Thread.Sleep(1000);
                 LearnSite.BLL.Signin sg = new LearnSite.BLL.Signin();
                 sg.Upgrade();// 在签到表中删除学生表中不存在班级的学生
                 System.Threading.Thread.Sleep(1000);
                 LearnSite.BLL.Webstudy ws = new LearnSite.BLL.Webstudy();
                 ws.Upgrade();//学年升级,删除Webstudy中学号不在Students的记录
                 DateTime nowtime2 = DateTime.Now;
                 Labelmsg.Text = "学年升级成功! 用时" + LearnSite.Common.Computer.Datagone(nowtime1, nowtime2) + "秒";
                 Btnupgrade.Enabled = false;
                 Session["Upgraded"] = "Done";
             }
             else
             {
                 Labelmsg.Text = "没有学生";
             }
     }
     else
     {
         Labelmsg.Text = "班级未设置!";
     }
 }
Esempio n. 10
0
    private void ShowWorks()
    {
        if (Request.QueryString["Snum"] != null)
        {
            string Snum = Request.QueryString["Snum"].ToString();
            HlkCircle.NavigateUrl = "~/Teacher/stuworkcircle.aspx?Snum=" + Snum;
            LearnSite.Model.Students smodel = new LearnSite.Model.Students();
            LearnSite.BLL.Students   sbll   = new LearnSite.BLL.Students();
            smodel           = sbll.SnumGetModel(Snum);
            LabelSnum.Text   = Snum;
            LabelSname.Text  = smodel.Sname;
            LabelWscore.Text = smodel.Sscore.ToString();
            int wgrade = smodel.Sgrade.Value;
            if (Request.QueryString["Sgrade"] != null)
            {
                wgrade = Int32.Parse(Request.QueryString["Sgrade"].ToString());
            }
            int wterm = Int32.Parse(LearnSite.Common.XmlHelp.GetTerm());
            if (Request.QueryString["Sterm"] != null)
            {
                wterm = Int32.Parse(Request.QueryString["Sterm"].ToString());
            }

            LearnSite.BLL.Works ws = new LearnSite.BLL.Works();
            GridViewworks.DataSource = ws.ShowThisTermWorks(Snum, wgrade, wterm);
            GridViewworks.DataBind();
        }
    }
Esempio n. 11
0
    private void ShowWorks()
    {
        if (Request.QueryString["Snum"] != null)
        {
            string Snum = Request.QueryString["Snum"].ToString();
            LearnSite.Model.Students smodel = new LearnSite.Model.Students();
            LearnSite.BLL.Students   sbll   = new LearnSite.BLL.Students();
            smodel = sbll.SnumGetModel(Snum);
            LearnSite.BLL.Works ws = new LearnSite.BLL.Works();
            DataTable           dt = ws.ShowMyAllWorks(Snum);
            GridViewworks.DataSource = dt;
            GridViewworks.DataBind();
            int count = dt.Rows.Count;
            LabelSname.Text = smodel.Sname + "同学的作品库(" + count.ToString() + ")";
            this.Page.Title = LearnSite.Common.CookieHelp.SetMainPageTitle() + " " + LabelSname.Text;

            if (count > 0)
            {
                msg = "";
                for (int i = 0; i < count; i++)
                {
                    int    score    = Int32.Parse(dt.Rows[i]["Wscore"].ToString()) + Int32.Parse(dt.Rows[i]["Wscore"].ToString());
                    string scorestr = score.ToString();
                    string jsondata = "[" + i.ToString() + ", " + scorestr + "],";
                    msg += jsondata;
                }
                msg = msg.TrimEnd(',');
            }
        }
    }
Esempio n. 12
0
    /// <summary>
    /// 先删除学生表中的毕业学生,再删除Ftp用户中的记录,再删除Signin表中的记录, 最后删除Web用户
    /// 学年升级(只是年级改变)不影响Ftp账号使用(因为Ftp账号是根据Syear,Sclass,Snum入学年份、班级、学号创建
    /// Ftp目录也是根据Syear,Sclass,Snum入学年份、班级、学号创建)
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Btnupgrade_Click(object sender, EventArgs e)
    {
        LearnSite.BLL.Room rm = new LearnSite.BLL.Room();
        if (rm.GradeCount() > 0)
        {
            DateTime nowtime1         = DateTime.Now;
            LearnSite.BLL.Students st = new LearnSite.BLL.Students();
            if (st.GetCounts() > 0)
            {
                st.Upgrade();    //所有年级升一级,并删除班级表中不存在班级的学生
                System.Threading.Thread.Sleep(1000);
                LearnSite.BLL.Signin sg = new LearnSite.BLL.Signin();
                sg.Upgrade();    // 在签到表中删除学生表中不存在班级的学生

                DateTime nowtime2 = DateTime.Now;
                Labelmsg.Text      = "学年升级成功! 用时" + LearnSite.Common.Computer.Datagone(nowtime1, nowtime2) + "秒";
                Btnupgrade.Enabled = false;
                LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
                rbll.UpdateRhidNone(); //清除班级选择
                LearnSite.BLL.Courses bll = new LearnSite.BLL.Courses();
                bll.HideCourse();      //将所有发布的学案收回,处于未发布状态
                LearnSite.Common.WordProcess.Alert("请给任课老师重新选择新学期任教班级!", this.Page);
                Session["Upgraded"] = "Done";
            }
            else
            {
                Labelmsg.Text = "没有学生";
            }
        }
        else
        {
            Labelmsg.Text = "班级未设置!";
        }
    }
Esempio n. 13
0
    protected void DataListGroup_ItemDataBound(object sender, DataListItemEventArgs e)
    {
        int          sgrade  = Int32.Parse(Request.QueryString["Sg"].ToString());
        int          sclass  = Int32.Parse(Request.QueryString["Sc"].ToString());
        string       sid     = ((Label)e.Item.FindControl("LabelSid")).Text;
        Label        lbgstus = (Label)e.Item.FindControl("LabelGstus");
        DropDownList ddl     = (DropDownList)e.Item.FindControl("DDLGscores");
        LinkButton   btnview = (LinkButton)e.Item.FindControl("LinkBtnView");

        LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
        lbgstus.Text = sbll.GroupMember(sgrade, sclass, int.Parse(sid));
        string snum = ((Label)e.Item.FindControl("LabelSnum")).Text;
        int    mid  = Int32.Parse(Request.QueryString["Mi"].ToString());

        LearnSite.BLL.GroupWork   gbll   = new LearnSite.BLL.GroupWork();
        LearnSite.Model.GroupWork gmodel = new LearnSite.Model.GroupWork();
        gmodel = gbll.GetModelBySnum(snum, mid);
        if (gmodel != null)
        {
            ddl.SelectedValue       = gmodel.Gscore.ToString();
            ddl.ToolTip             = gmodel.Gid.ToString();
            btnview.CommandArgument = gmodel.Gurl;
        }
        else
        {
            ddl.SelectedValue = "0";
            ddl.Enabled       = false;
            btnview.Enabled   = false;
        }
    }
Esempio n. 14
0
    private int GetmySgroup()
    {
        int Sid = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sid"].ToString());

        LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
        return(sbll.GetSgroup(Sid));//获取自己的组号
    }
Esempio n. 15
0
 protected void BtnsEdit_Click(object sender, EventArgs e)
 {
     if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
     {
         int Sid = Int32.Parse(Request.QueryString["Sid"].ToString());
         LearnSite.Model.Students student = new LearnSite.Model.Students();
         student.Sid           = Sid;
         student.Syear         = Int32.Parse(Tsyear.Text.Trim());
         student.Sgrade        = Int32.Parse(DDLgrade.SelectedValue);
         student.Sclass        = Int32.Parse(DDLclass.SelectedValue);
         student.Sname         = Tsname.Text.Trim();
         student.Sex           = DDLsex.SelectedValue;
         student.Spwd          = Tspwd.Text.Trim();
         student.Saddress      = Tsaddress.Text.Trim();
         student.Sphone        = Tsphone.Text.Trim();
         student.Sparents      = Tsparents.Text.Trim();
         student.Sheadtheacher = Tsheadtheacher.Text.Trim();
         LearnSite.BLL.Students stubll = new LearnSite.BLL.Students();
         stubll.Update(student);
         Btnsedit.Text = "修改成功";
         string Hid = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();
         if (DDLclass.SelectedValue != Session[Hid + "class"].ToString())
         {
             //如果转班,再生成ftp目录,并修改ftp账号中的 Access和HomeDir值(传递Syear,Sclass,Snum)
             LearnSite.Ftp.Disk.CreateOneDir(Tsyear.Text.Trim(), DDLclass.SelectedValue, Tsnum.Text);
             LearnSite.Ftp.Reg.RegEditFtp(Tsnum.Text, Tsyear.Text.Trim(), DDLclass.SelectedValue);
         }
         System.Threading.Thread.Sleep(1000);
         string url = "~/Teacher/studentshow.aspx?Sid=" + Sid;
         Response.Redirect(url, false);
     }
 }
Esempio n. 16
0
 protected void Btnedit_Click(object sender, EventArgs e)
 {
     string OldPwd = TextBoxoldpwd.Text.Trim();
     string myPwd = Request.Cookies["StudentCookies"].Values["Spwd"].ToString();
     if (OldPwd == myPwd)
     {
         string Spwd = TextBoxpwd.Text.Trim();
         if (LearnSite.Common.WordProcess.IsEnNum(Spwd))
         {
             string Snum = Server.UrlDecode(Request.Cookies["StudentCookies"].Values["Snum"].ToString());
             LearnSite.BLL.Students bll = new LearnSite.BLL.Students();
             bll.UpdatePwd(Snum, Spwd);
             LearnSite.Common.CookieHelp.ClearStudentCookies();
             System.Threading.Thread.Sleep(500);
             this.Response.Write(" <script language=javascript>alert('修改成功!');window.window.location.href='myinfo.aspx';</script> ");
         }
         else
         {
             Labelmsg.Text = "密码必须为英文字母或数字组成!";
             TextBoxpwd.Text = "";
         }
     }
     else
     {
         Labelmsg.Text = "旧密码输入错误!";
     }
 }
Esempio n. 17
0
 protected void BtnsEdit_Click(object sender, EventArgs e)
 {
     if (Request.Cookies["TeacherCookies"] != null)
     {
         int Sid = Int32.Parse(Request.QueryString["Sid"].ToString());
         LearnSite.Model.Students student = new LearnSite.Model.Students();
         student.Sid = Sid;
         student.Syear = Int32.Parse(Tsyear.Text.Trim());
         student.Sgrade = Int32.Parse(DDLgrade.SelectedValue);
         student.Sclass = Int32.Parse(DDLclass.SelectedValue);
         student.Sname = Tsname.Text.Trim();
         student.Sex = Tsex.Text.Trim();
         student.Spwd = Tspwd.Text.Trim();
         student.Saddress = Tsaddress.Text.Trim();
         student.Sphone = Tsphone.Text.Trim();
         student.Sparents = Tsparents.Text.Trim();
         student.Sheadtheacher = Tsheadtheacher.Text.Trim();
         LearnSite.BLL.Students stubll = new LearnSite.BLL.Students();
         stubll.Update(student);
         Btnsedit.Text = "修改成功";
         string Hid = Request.Cookies["TeacherCookies"].Values["Hid"].ToString();
         if (DDLclass.SelectedValue != Session[Hid + "class"].ToString())
         {
             //如果转班,再生成ftp目录,并修改ftp账号中的 Access和HomeDir值(传递Syear,Sclass,Snum)
             int Snum = Int32.Parse(Tsnum.Text);
             LearnSite.Ftp.Disk.CreateOneDir(Int32.Parse(Tsyear.Text.Trim()), Int32.Parse(DDLclass.SelectedValue), Snum);
             LearnSite.Ftp.Reg.RegEditFtp(Tsnum.Text, Tsyear.Text.Trim(), DDLclass.SelectedValue);
         }
         System.Threading.Thread.Sleep(1000);
         string url = "~/Teacher/studentshow.aspx?Sid=" + Sid;
         Response.Redirect(url, false);
     }
 }
Esempio n. 18
0
    protected void Btnsex_Click(object sender, EventArgs e)
    {
        string myname = TextBoxName.Text.Trim();

        if (!string.IsNullOrEmpty(myname))
        {
            if (LearnSite.Common.WordProcess.IsZh(myname))
            {
                string mySnum = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString();
                LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
                sbll.ChangeSname(mySnum, myname);
                LearnSite.Common.CookieHelp.EditCookiesItem("StudentCookies", "Sname", Server.UrlEncode(myname));
                System.Threading.Thread.Sleep(500);
                string msg = "修改姓名成功! 确定跳转";
                LearnSite.Common.WordProcess.Alert(msg, this.Page);
                Response.Redirect("~/Student/myinfo.aspx", false);
            }
            else
            {
                Labelstr.Text = "请输入中文姓名,不能有空格!";
            }
        }
        else
        {
            Labelstr.Text = "请输入你的姓名!";
        }
    }
Esempio n. 19
0
    protected void BtnsEdit_Click(object sender, EventArgs e)
    {
        if (Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname] != null)
        {
            int Sid = Int32.Parse(Request.QueryString["Sid"].ToString());
            LearnSite.Model.Students student = new LearnSite.Model.Students();
            student.Sid           = Sid;
            student.Syear         = Int32.Parse(Tsyear.Text.Trim());
            student.Sgrade        = Int32.Parse(DDLgrade.SelectedValue);
            student.Sclass        = Int32.Parse(DDLclass.SelectedValue);
            student.Sname         = Tsname.Text.Trim();
            student.Sex           = DDLsex.SelectedValue;
            student.Spwd          = Tspwd.Text.Trim();
            student.Saddress      = Tsaddress.Text.Trim();
            student.Sphone        = Tsphone.Text.Trim();
            student.Sparents      = Tsparents.Text.Trim();
            student.Sheadtheacher = Tsheadtheacher.Text.Trim();
            LearnSite.BLL.Students stubll = new LearnSite.BLL.Students();
            stubll.Update(student);
            Btnsedit.Text = "修改成功";

            System.Threading.Thread.Sleep(1000);
            string url = "~/Teacher/studentshow.aspx?Sid=" + Sid;
            Response.Redirect(url, false);
        }
    }
Esempio n. 20
0
    protected void BtnScore_Click(object sender, EventArgs e)
    {
        DateTime nowtime1 = DateTime.Now;

        LearnSite.BLL.Students stu = new LearnSite.BLL.Students();
        stu.ClearAllScores();
        stu.UpdateBestSquiz();     //取回测验最高成绩
        stu.ThisTeamScoresNew();   //批量更新所教所有班级当前学期作品总积分和表现总积分、调查测验分

        stu.ThisTeamGroupScores(); //批量更新所教班级当前学期小组合作分

        stu.UpdateWebScore();      // 更新学生表中网页制作成绩
        stu.UpdateStscore();       // 更新学生表的打字成绩
        stu.UpdateSfscore();       //更新学生表的指法成绩
        stu.UpdateSchinese();      //更新学生表的中文拼音成绩

        int persscore   = int.Parse(DDLwork.SelectedValue);
        int persquiz    = int.Parse(DDLquiz.SelectedValue);
        int perswscore  = int.Parse(DDLweb.SelectedValue);
        int perstscore  = int.Parse(DDLtyper.SelectedValue);
        int perattitude = int.Parse(DDLattitude.SelectedValue);
        int persurvey   = int.Parse(DDLsurvey.SelectedValue);

        stu.UpdateAllScore(persscore, persquiz, perswscore, perstscore, perattitude, persurvey);//登录账号教师所教班级按设定百分比计算总分
        DateTime nowtime2 = DateTime.Now;

        Labelmsg.Text = "统计用时:" + LearnSite.Common.Computer.DatagoneMilliseconds(nowtime1, nowtime2) + "毫秒";
        System.Threading.Thread.Sleep(200);
        showstudents();
    }
Esempio n. 21
0
    private void ShowStudent()
    {
        int mySid  = cook.Sid;
        int Sgrade = cook.Sgrade;
        int Sclass = cook.Sclass;

        Labelip.Text = cook.LoginIp;
        snum.Text    = cook.Snum;
        sclass.Text  = Sgrade.ToString() + "." + Sclass.ToString() + "班";
        sname.Text   = Server.UrlDecode(cook.Sname);
        string ssex = Server.UrlDecode(cook.Sex);

        sscore.Text    = cook.Sscore.ToString();
        sattitude.Text = cook.Sattitude.ToString();
        LearnSite.BLL.Students dbll = new LearnSite.BLL.Students();
        sleadername.Text = Server.UrlDecode(dbll.GetLeader(mySid));
        string murl = LearnSite.Common.Photo.GetStudentPhotoUrl(snum.Text, ssex);

        Imageface.ImageUrl = murl + "?temp=" + DateTime.Now.Millisecond.ToString();
        LabelRank.Text     = Server.UrlDecode(cook.RankImage);
        int myscores = int.Parse(sscore.Text);

        LabelRank.ToolTip = "你当前的等级为:" + myscores / 3 + "级";

        LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
        Session["myClassCid"] = rbll.GetRcid(Sgrade, Sclass);
    }
Esempio n. 22
0
    protected void GVStudent_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName.Equals("ChangePwd"))
        {
            int    mySid = Convert.ToInt32(e.CommandArgument.ToString());
            string myPwd = LearnSite.Common.WordProcess.GenerateRandomNum(2);
            LearnSite.BLL.Students bll = new LearnSite.BLL.Students();
            bll.UpdateSidPwd(mySid.ToString(), myPwd);
            ShowStudents();
            string ch = "你的新密码是:" + myPwd;
            LearnSite.Common.WordProcess.Alert(ch, this.Page);
        }
        if (e.CommandName.Equals("ChangeGroup"))
        {
            int mySid = Convert.ToInt32(e.CommandArgument.ToString());
            LearnSite.BLL.Students bll = new LearnSite.BLL.Students();
            bll.ChangeSleader(mySid);
            System.Threading.Thread.Sleep(300);
            ShowStudents();
        }

        if (e.CommandName.Equals("QuitGroup"))
        {
            int mySid = Convert.ToInt32(e.CommandArgument.ToString());
            LearnSite.BLL.Students bll = new LearnSite.BLL.Students();
            bll.QuitThitGroup(mySid);
            System.Threading.Thread.Sleep(300);
            ShowStudents();
        }
    }
Esempio n. 23
0
    private void ListSelectShare()
    {
        bool   isgp     = CkIsGroup.Checked;//是否小组或个人
        string Sname    = Server.UrlDecode(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sname"].ToString());
        string Snum     = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Snum"].ToString();
        string Syear    = Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Syear"].ToString();
        int    Sgrade   = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
        int    Sclass   = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString());
        bool   isenable = isShareEnable(Sgrade, Sclass);

        if (isenable)
        {
            if (isgp)
            {
                int Sgroup = GetmySgroup();//获取自己的组号
                if (Sgroup > 0)
                {
                    if (isGroupShareEnable(Sgrade, Sclass))
                    {
                        LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
                        Labeltitle.Text = "《" + sbll.GetSgtitle(Sgroup) + "》小组网盘";
                        ListShareFiles(Syear, Sclass.ToString(), Sgroup.ToString(), isgp);//列出网盘文件
                        Fupload.Visible   = true;
                        Btnupload.Visible = true;
                    }
                    else
                    {
                        Labeltitle.Text    = "小组网盘未启用……";
                        Dlfilelist.Visible = false;
                        Fupload.Visible    = false;
                        Btnupload.Visible  = false;
                        Labeldisk.Text     = "";
                    }
                }
                else
                {
                    Labeltitle.Text    = "您未参加小组……";
                    Dlfilelist.Visible = false;
                    Fupload.Visible    = false;
                    Btnupload.Visible  = false;
                    Labeldisk.Text     = "";
                }
            }
            else
            {
                ListShareFiles(Syear, Sclass.ToString(), Snum, isgp);//列出网盘文件
                Labeltitle.Text   = Sname + "个人网盘";
                Fupload.Visible   = true;
                Btnupload.Visible = true;
            }
        }
        else
        {
            Labeltitle.Text    = "个人网盘未启用……";
            Dlfilelist.Visible = false;
            Fupload.Visible    = false;
            Btnupload.Visible  = false;
        }
        showDiskgif(isenable, isgp);
    }
Esempio n. 24
0
    protected void Btnlogin_Click(object sender, EventArgs e)
    {
        string Snum = TextBoxuser.Text.Trim();
        string Spwd = TextBoxpwd.Text.Trim();
        if (Snum != "" && Spwd != "")
        {
            if (LearnSite.Common.WordProcess.IsEnNum(Snum) && LearnSite.Common.WordProcess.IsEnNum(Spwd))
            {
                LearnSite.Model.Students model = new LearnSite.Model.Students();
                LearnSite.BLL.Students bll = new LearnSite.BLL.Students();
                int loginm = LearnSite.Common.XmlHelp.LoginMode();//获取登录方式 0表示个人密码方式登录 1表示班级密码方式登录
                if (loginm == 1)
                {
                    if (bll.ExistsLogin(Snum, Spwd))
                    {
                        model = bll.SnumGetModel(Snum);//查询该学号和班级密码的学生是否存在,存在返回实体,不存在返回null
                    }
                    else
                    {
                        model = null;
                    }
                }
                else
                {
                    model = bll.GetStudentModel(Snum, Spwd);//查询该学号密码学生是否存在,存在返回实体,不存在返回null
                }
                System.Threading.Thread.Sleep(500);
                if (model != null)
                {
                    if (LearnSite.Common.CookieHelp.SetStudentCookies(model))//写cookies
                    {
                        DateTime LoginTime = DateTime.Now;
                        string LoginIP = LearnSite.Common.Computer.GetGuestIP();
                        LearnSite.BLL.Signin gbll = new LearnSite.BLL.Signin();
                        gbll.SigninToday(Snum, LoginTime, LoginIP);//签到
                        System.Threading.Thread.Sleep(1000);
                        Response.Redirect("~/Student/myinfo.aspx", false);

                    }
                    else
                    {
                        string msg = "本机cookies设置失效,无法登录!";
                        Labelmsg.Text = msg;
                    }
                }
                else
                {
                    Labelmsg.Text = "用户名或密码错误!";
                    TextBoxuser.Text = "";
                    TextBoxpwd.Text = "";
                }

            }
            else
            {
                Labelmsg.Text = "用户名或密码含有非法字符";
            }
        }
    }
Esempio n. 25
0
 private void ListSnum()
 {
     int Sgrade = Int32.Parse(DDLgrade.SelectedValue);
     int Sclass = Int32.Parse(DDLclass.SelectedValue);
     LearnSite.BLL.Students st=new LearnSite.BLL.Students();
     DataListsnum.DataSource = st.GetNameNum(Sgrade, Sclass);
     DataListsnum.DataBind();
 }
Esempio n. 26
0
    private void ShowStudent()
    {
        int Sid = Int32.Parse(Request.QueryString["Sid"].ToString());

        LearnSite.BLL.Students stu = new LearnSite.BLL.Students();
        Repeater1.DataSource = stu.GetOneStudent(Sid);
        Repeater1.DataBind();
    }
Esempio n. 27
0
    private void ShowScoreTop()
    {
        int Qgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());

        LearnSite.BLL.Students st = new LearnSite.BLL.Students();
        GridViewscore.DataSource = st.ShowTopScore(Qgrade);
        GridViewscore.DataBind();
    }
Esempio n. 28
0
 protected void BtnQuizbest_Click(object sender, EventArgs e)
 {
     LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
     sbll.UpdateBestSquiz();
     Labelmsg.Text = "将所有学生的测验统计成绩更新为本学期其测验最高分!";
     System.Threading.Thread.Sleep(500);
     showstudents();
 }
Esempio n. 29
0
    private void ShowStudent()
    {
        int Sid = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sid"].ToString());

        LearnSite.BLL.Students stu = new LearnSite.BLL.Students();
        Repeater1.DataSource = stu.GetOneStudent(Sid);
        Repeater1.DataBind();
    }
Esempio n. 30
0
    private void ShowStudent()
    {
        LearnSite.Model.Cook cook = new LearnSite.Model.Cook();

        LearnSite.BLL.Students stu = new LearnSite.BLL.Students();
        Repeater1.DataSource = stu.GetOneStudent(cook.Sid);
        Repeater1.DataBind();
    }
Esempio n. 31
0
 protected void Btnstudent_Click(object sender, EventArgs e)
 {
     int Rgrade = Int32.Parse(DDLgrade.SelectedValue);
     int Rclass = Int32.Parse(DDLclass.SelectedValue);
     LearnSite.BLL.Students bll = new LearnSite.BLL.Students();
     LearnSite.Common.CookieHelp.SetStudentCookies(bll.GetRndModel(Rgrade, Rclass));
     System.Threading.Thread.Sleep(1000);
     Response.Redirect("~/index.aspx", false);
 }
Esempio n. 32
0
 protected void LinkBtnDel_Click(object sender, EventArgs e)
 {
     int Sid = Int32.Parse(Request.QueryString["Sid"].ToString());
     LearnSite.BLL.Students stu = new LearnSite.BLL.Students();
     stu.Delete(Sid);
     System.Threading.Thread.Sleep(1000);
     string url = "~/Teacher/student.aspx?Sgrade=" + Request.QueryString["Sgrade"].ToString() + "&&Sclass=" + Request.QueryString["Sclass"].ToString();
     Response.Redirect(url, false);
 }
Esempio n. 33
0
    private void showStudents()
    {
        int Sgrade = Int32.Parse(Request.QueryString["wGrade"].ToString());
        int Sclass = Int32.Parse(Request.QueryString["wClass"].ToString());

        LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
        GVdisk.DataSource = sbll.GetStudentsSnumSname(Sgrade, Sclass);
        GVdisk.DataBind();
    }
Esempio n. 34
0
    private void showGroup()
    {
        int sgrade = cook.Sgrade;
        int sclass = cook.Sclass;

        LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
        GVgroup.DataSource = sbll.ClassGroup(sgrade, sclass);
        GVgroup.DataBind();
    }
Esempio n. 35
0
    private void ShowScoreTop()
    {
        int Sgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
        int Sclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString());

        LearnSite.BLL.Students st = new LearnSite.BLL.Students();
        GVScore.DataSource = st.ShowMyclassScore(Sgrade, Sclass);
        GVScore.DataBind();
    }
Esempio n. 36
0
    private void showGroup()
    {
        int sgrade = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sgrade"].ToString());
        int sclass = Int32.Parse(Request.Cookies[LearnSite.Common.CookieHelp.stuCookieNname].Values["Sclass"].ToString());

        LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
        GVgroup.DataSource = sbll.ClassGroup(sgrade, sclass);
        GVgroup.DataBind();
    }
Esempio n. 37
0
    private void ShowClassTop()
    {
        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.Students st = new LearnSite.BLL.Students();
        GridViewclass.DataSource = st.TopClassQuiz(Qgrade, Qclass);
        GridViewclass.DataBind();
    }
Esempio n. 38
0
    private void ShowScoreTop()
    {
        int Sgrade = cook.Sgrade;
        int Sclass = cook.Sclass;

        LearnSite.BLL.Students st = new LearnSite.BLL.Students();
        GVScore.DataSource = st.ShowMyclassScore(Sgrade, Sclass);
        GVScore.DataBind();
    }
Esempio n. 39
0
 protected void Btnape_Click(object sender, EventArgs e)
 {
     DateTime nowtime1 = DateTime.Now;
         LearnSite.BLL.Students stus = new LearnSite.BLL.Students();
         stus.TermAPE();//开始自动评价汇总,40%为A优秀,10%为E待合格,50%为合格
         DateTime nowtime2 = DateTime.Now;
         System.Threading.Thread.Sleep(1000);
         showstudents();
         Labelmsg.Text = "评价用时:" + LearnSite.Common.Computer.Datagone(nowtime1, nowtime2) + "秒";
 }
Esempio n. 40
0
 protected void BtnScore_Click(object sender, EventArgs e)
 {
     DateTime nowtime1 = DateTime.Now;
     LearnSite.BLL.Students stu = new LearnSite.BLL.Students();
     stu.ThisTeamScores();//批量更新所教所有班级当前学期总积分
     DateTime nowtime2 = DateTime.Now;
     System.Threading.Thread.Sleep(1000);
     showstudents();
     Labelmsg.Text = "统计用时:" + LearnSite.Common.Computer.Datagone(nowtime1, nowtime2) + "秒";
 }
Esempio n. 41
0
    protected void Btnquiz_Click(object sender, EventArgs e)
    {
        string strscore = Labelallscore.Text;
        if (strscore != "")
        {
            int Rscore = Int32.Parse(strscore);
            if (Rscore > 0)
            {
                string Rnum = Request.Cookies["StudentCookies"].Values["Snum"].ToString();
                string odate = DateTime.Now.ToShortDateString();
                DateTime Rdate = DateTime.Parse(odate);
                Labelmsg.Text = Rdate.ToString();

                LearnSite.BLL.Result bll = new LearnSite.BLL.Result();
                if (bll.ExistsBynumdate(Rnum, Rdate))
                {
                    Labelmsg.Text = "今天已经通过测验!";
                }
                else
                {
                    LearnSite.Model.Result model = new LearnSite.Model.Result();
                    model.Rdate = Rdate;
                    model.Rnum = Rnum;
                    model.Rscore = Rscore;
                    bll.Add(model);//增加今天测验成绩记录
                    int Squiz = bll.GetAverage(Rnum);//计算获得该学号的测验成绩总平均值
                    LearnSite.BLL.Students stbll = new LearnSite.BLL.Students();
                    stbll.SetSquiz(Rnum, Squiz);//更新该学号的测验成绩
                    System.Threading.Thread.Sleep(1000);
                    Labelmsg.Text = "测验成绩成功提交!";
                    PrintQids();
                    Btnquiz.Enabled = false;
                    HLanswer.Enabled = true;
                    HLanswer.Visible = true;
                }
            }
            else
            {
                Labelmsg.Text = "测验成绩为零!";
            }
        }
        else
        {
            Labelmsg.Text = "请先进行测验!";
        }
    }
Esempio n. 42
0
    /// <summary>
    /// Snum,Syear,Sgrade,Sclass,Sname,Spwd,Sex,Saddress,Sphone,Sparents,Sheadtheacher,Sscore,Sattitude
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Btnadd_Click(object sender, EventArgs e)
    {
        if (Tsname.Text != "")
        {
            LearnSite.Model.Students student = new LearnSite.Model.Students();
            student.Snum = Tsnum.Text;
            student.Syear = Int32.Parse(DDLyear.SelectedValue);
            student.Sgrade = Int32.Parse(DDLgrade.SelectedValue);
            student.Sclass = Int32.Parse(DDLclass.SelectedValue);
            student.Sname = Tsname.Text.Trim();
            student.Sex = DDLsex.SelectedValue;
            student.Spwd = Tspwd.Text;
            student.Saddress = Tsaddress.Text.Trim();
            student.Sphone = Tsphone.Text.Trim();
            student.Sparents = Tsparents.Text.Trim();
            student.Sheadtheacher = Tsheadtheacher.Text.Trim();
            student.Sscore = 0;
            student.Sattitude = 0;
            LearnSite.BLL.Students stubll = new LearnSite.BLL.Students();
            int NewSid = stubll.AddStudent(student);
            Labelmsg.Text = "添加成功";
            //创建ftp目录,添加到Webstudy,添加ftp账号
            int Snum = Int32.Parse(Tsnum.Text);
            LearnSite.Ftp.Disk.CreateOneDir(Int32.Parse(DDLyear.SelectedValue), Int32.Parse(DDLclass.SelectedValue), Snum);
            LearnSite.BLL.Webstudy ws = new LearnSite.BLL.Webstudy();
            ws.AddOne(Tsnum.Text, Tspwd.Text);
            LearnSite.Ftp.Reg.RegsaveFtp(Tsnum.Text, Tspwd.Text, DDLyear.SelectedValue, DDLclass.SelectedValue);

            System.Threading.Thread.Sleep(1000);
            string url = "~/Teacher/studentshow.aspx?Sid=" + NewSid.ToString();
            Response.Redirect(url, false);
        }
        else
        {
            Labelmsg.Text = "姓名、入学年份不能为空!";
        }
    }
Esempio n. 43
0
 /// <summary>
 /// 自动设置本级段学号最大值
 /// </summary>
 private void SetSnum()
 {
     int Sgrade = Int32.Parse(DDLgrade.SelectedValue);
     LearnSite.BLL.Students stubbl = new LearnSite.BLL.Students();
     int NewSnum = stubbl.GetMaxSnum(Sgrade);
     Tsnum.Text = NewSnum.ToString();
 }
Esempio n. 44
0
 private void SetSyear()
 {
     int mSgrade = Int32.Parse(DDLgrade.SelectedValue);
     LearnSite.BLL.Students sbll = new LearnSite.BLL.Students();
     string mSyear = sbll.GetYear(mSgrade);
     ListItem li = new ListItem();
     li.Text = mSyear;
     li.Value = mSyear;
     DDLyear.Items.Add(li);
     DDLyear.Enabled = false;
 }
Esempio n. 45
0
 private void ShowStudents()
 {
     int Sgrade = Int32.Parse(DDLgrade.SelectedValue.ToString());
     int Sclass = Int32.Parse(DDLclass.SelectedValue.ToString());
     LearnSite.BLL.Students stus = new LearnSite.BLL.Students();
     GVStudent.DataSource = stus.GetListStudents(Sgrade, Sclass);
     GVStudent.DataBind();
 }
Esempio n. 46
0
 private void ShowStudent()
 {
     int Sid =Int32.Parse( Request.QueryString["Sid"].ToString());
     LearnSite.Model.Students student = new LearnSite.Model.Students();
     LearnSite.BLL.Students stubll = new LearnSite.BLL.Students();
     student = stubll.GetModel(Sid);
     Tsnum.Text = student.Snum;
     Tsyear.Text = student.Syear.ToString();
     DDLgrade.SelectedValue = student.Sgrade.ToString();;
     DDLclass.SelectedValue = student.Sclass.ToString();
     Tsname.Text = student.Sname;
     Tspwd.Text = student.Spwd;
     Tsex.Text = student.Sex;
     Tsaddress.Text = student.Saddress;
     Tsphone.Text = student.Sphone;
     Tsparents.Text = student.Sparents;
     Tsheadtheacher.Text = student.Sheadtheacher;
     Tsscore.Text = student.Sscore.ToString();
     Tsattitude.Text = student.Sattitude.ToString();
     string Hid = Request.Cookies["TeacherCookies"].Values["Hid"].ToString();
     Session[Hid+"grade"] = DDLgrade.SelectedValue;
     Session[Hid+"class"] = DDLclass.SelectedValue;
 }
Esempio n. 47
0
 private void ShowGradeTop()
 {
     int Qgrade = Int32.Parse(Request.Cookies["StudentCookies"].Values["Sgrade"].ToString());
     int Qclass = Int32.Parse(Request.Cookies["StudentCookies"].Values["Sclass"].ToString());
     LearnSite.BLL.Students st = new LearnSite.BLL.Students();
     GridViewgrade.DataSource = st.TopGradeQuiz(Qgrade);
     GridViewgrade.DataBind();
 }
Esempio n. 48
0
 protected void BtnExcel_Click(object sender, EventArgs e)
 {
     LearnSite.BLL.Students stu = new LearnSite.BLL.Students();
     stu.StudentsToExcel();
 }
Esempio n. 49
0
 private void ShowScoreTop()
 {
     int Qgrade = Int32.Parse(Request.Cookies["StudentCookies"].Values["Sgrade"].ToString());
     LearnSite.BLL.Students st = new LearnSite.BLL.Students();
     GridViewscore.DataSource = st.ShowTopScore(Qgrade);
     GridViewscore.DataBind();
 }
Esempio n. 50
0
 private void ShowMySquiz()
 {
     string mySnum = Request.Cookies["StudentCookies"].Values["Snum"].ToString();
     LearnSite.BLL.Students bll = new LearnSite.BLL.Students();
     LabelSquiz.Text = bll.MySquiz(mySnum);
     LearnSite.BLL.Result rbll = new LearnSite.BLL.Result();
     GVmyScore.DataSource = rbll.GetListScore(mySnum);
     GVmyScore.DataBind();
 }
Esempio n. 51
0
 private void ShowScoreTop()
 {
     int Sgrade = Int32.Parse(Request.Cookies["StudentCookies"].Values["Sgrade"].ToString());
     int Sclass = Int32.Parse(Request.Cookies["StudentCookies"].Values["Sclass"].ToString());
     LearnSite.BLL.Students st = new LearnSite.BLL.Students();
     GVScore.DataSource = st.ShowMyclassScore(Sgrade, Sclass);
     GVScore.DataBind();
 }