示例#1
0
    protected void ButtonClearTyper_Click(object sender, EventArgs e)
    {
        LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper();
        int pct = pbll.DeleteAll();

        Labelmsg.Text = "执行结果:清除中文打字成绩共" + pct.ToString() + "条";
    }
示例#2
0
    /// <summary>
    /// 未启用
    /// </summary>
    private void showTidtyper()
    {
        string Tid = LTid.Text;

        if (Tid != "" && LearnSite.Common.WordProcess.IsNum(Tid))
        {
            LearnSite.BLL.Ptyper pt = new LearnSite.BLL.Ptyper();
            GVTyper.DataSource = pt.ShowTypeScore(Int32.Parse(Tid));
            GVTyper.DataBind();
        }
    }
示例#3
0
    protected void DataList_wai_ItemDataBound(object sender, DataListItemEventArgs e)
    {
        Label    lb = (Label)e.Item.FindControl("Labelgrade");
        DataList dl = (DataList)e.Item.FindControl("DataList_li");

        LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper();
        int gd = Int32.Parse(lb.Text);

        dl.DataSource = pbll.ShowTopTypeScore(gd, gettop());
        dl.DataBind();
        ((Label)e.Item.FindControl("Labelgrade")).Text = LearnSite.Common.WordProcess.ChineseNum(gd) + "年级";
    }
示例#4
0
    private void showtyper()
    {
        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.Ptyper pt = new LearnSite.BLL.Ptyper();
        GVTyper.DataSource = pt.ShowClassTypeScore(Sgrade, Sclass);
        GVTyper.DataBind();

        string Tid = LTid.Text;
        string url = "~/Student/typerclass.aspx?Tid=" + Tid;

        HyperLink2.NavigateUrl = url;
    }
示例#5
0
    protected void ButtonClearType_Click(object sender, EventArgs e)
    {
        string Hid = tcook.Hid.ToString();

        if (!string.IsNullOrEmpty(Hid))
        {
            int rhid = Int32.Parse(Hid);
            LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper();
            pbll.DeleteMyAll(rhid);

            ButtonClearType.Enabled = false;
            labelmsg.Text           = "清除所教班级学生中文打字成绩成功!";
        }
    }
示例#6
0
    private void showtyper()
    {
        int Sgrade = cook.Sgrade;
        int Sclass = cook.Sclass;

        LearnSite.BLL.Ptyper pt = new LearnSite.BLL.Ptyper();
        GVTyper.DataSource = pt.ShowClassTypeScore(Sgrade, Sclass);
        GVTyper.DataBind();

        string Tid = LTid.Text;
        string url = "~/Student/typerclass.aspx?Tid=" + Tid;

        HyperLink2.NavigateUrl = url;
    }
示例#7
0
    protected void ButtonClearThis_Click(object sender, EventArgs e)
    {
        string Hid = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();

        if (!string.IsNullOrEmpty(Hid))
        {
            int rhid                  = Int32.Parse(Hid);
            int OverPscore            = int.Parse(DDLpscore.SelectedValue);
            LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper();
            pbll.DeleteOverScore(OverPscore, rhid);
            ButtonClearThis.Enabled = false;
            labelmsg.Text           = "清除所教班级学生超过指定速度的打字成绩成功!";
        }
    }
示例#8
0
    protected void ButtonClearType_Click(object sender, EventArgs e)
    {
        string Hid = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();

        if (!string.IsNullOrEmpty(Hid))
        {
            int rhid = Int32.Parse(Hid);
            LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper();
            pbll.DeleteMyAll(rhid);

            ButtonClearType.Enabled = false;
            labelmsg.Text           = "清除所教班级学生中文打字成绩成功!";
        }
    }
示例#9
0
 private void showtyper()
 {
     if (!string.IsNullOrEmpty(Request.QueryString["Tid"]))
     {
         int    Ptid   = Int32.Parse(Request.QueryString["Tid"].ToString());
         string sgrade = DDLgrade.SelectedValue;
         string sclass = DDLclass.SelectedValue;
         if (!string.IsNullOrEmpty(sgrade) && !string.IsNullOrEmpty(sclass))
         {
             LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper();
             GVTyper.DataSource = pbll.ShowClassTidScore(Int32.Parse(sgrade), Int32.Parse(sclass), Ptid);
             GVTyper.DataBind();
         }
     }
 }
示例#10
0
    private void showwai()
    {
        LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
        DataList_wai.DataSource = rbll.GetAllGrade();
        DataList_wai.DataBind();
        DataList_enwai.DataSource = DataList_wai.DataSource;
        DataList_enwai.DataBind();

        LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper();

        DataList_allc.DataSource = pbll.ShowSchoolTopTypeScore(gettop());
        DataList_allc.DataBind();

        LearnSite.BLL.Pfinger fbll = new LearnSite.BLL.Pfinger();

        DataList_enall.DataSource = fbll.ShowSchoolTopFingerScore(gettop());
        DataList_enall.DataBind();
    }
示例#11
0
    private void showtops()
    {
        if (DDLgrade.SelectedValue != "")
        {
            int    grade = Int32.Parse(DDLgrade.SelectedValue);
            int    top   = Int32.Parse(DDLtop.SelectedValue);
            string tys   = DDLtype.SelectedValue;
            switch (tys)
            {
            case "0":
                LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper();
                DataList_A4.DataSource = pbll.ShowTopTypeScore(grade, top);
                DataList_A4.DataBind();
                break;

            case "1":
                LearnSite.BLL.Pfinger fbll = new LearnSite.BLL.Pfinger();
                DataList_A4.DataSource = fbll.ShowTopFingerScoreAs(grade, top);
                DataList_A4.DataBind();
                break;
            }
        }
    }
示例#12
0
    private void ShowTyper()
    {
        LearnSite.Model.Cook cook = new LearnSite.Model.Cook();

        LearnSite.BLL.Ptyper pr = new LearnSite.BLL.Ptyper();
        string sestr            = DDLselect.SelectedValue;

        switch (sestr)
        {
        case "1":
            GVTyper.DataSource = pr.ShowSchoolTypeScore();
            break;

        case "2":
            GVTyper.DataSource = pr.ShowAllTypeScore(cook.Sgrade);
            break;

        case "3":
            GVTyper.DataSource = pr.ShowClassTypeScore(cook.Sgrade, cook.Sclass);
            break;
        }
        GVTyper.DataBind();
    }
示例#13
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);
     }
 }
示例#14
0
    private void ShowTyper()
    {
        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());

        LearnSite.BLL.Ptyper pr = new LearnSite.BLL.Ptyper();
        string sestr            = DDLselect.SelectedValue;

        switch (sestr)
        {
        case "1":
            GVTyper.DataSource = pr.ShowSchoolTypeScore();
            break;

        case "2":
            GVTyper.DataSource = pr.ShowAllTypeScore(MySgrade);
            break;

        case "3":
            GVTyper.DataSource = pr.ShowClassTypeScore(MySgrade, MySclass);
            break;
        }
        GVTyper.DataBind();
    }
示例#15
0
 private void showtyper()
 {
     int Sgrade = Int32.Parse(Request.Cookies["StudentCookies"].Values["Sgrade"].ToString());
     int Sclass = Int32.Parse(Request.Cookies["StudentCookies"].Values["Sclass"].ToString());
     LearnSite.BLL.Ptyper pt = new LearnSite.BLL.Ptyper();
     GVTyper.DataSource = pt.ShowClassTypeScore(Sgrade, Sclass);
     GVTyper.DataBind();
 }
示例#16
0
 private void showTidtyper()
 {
     string Tid = LTid.Text;
     if (Tid != "" && LearnSite.Common.WordProcess.IsNum(Tid))
     {
         LearnSite.BLL.Ptyper pt = new LearnSite.BLL.Ptyper();
         GVTyper.DataSource = pt.ShowTypeScore(Int32.Parse(Tid));
         GVTyper.DataBind();
     }
 }
示例#17
0
 private void SaveTypeRecord(string Psnum,string Pip)
 {
     string TypeScore = Request.Form["Typeresult"].ToString();//
     TypeScore = TypeScore.Replace("字/分", "");
     string nowstr = Request.Form["TypeText7"].ToString();
     string rightword = Request.Form["TypeText4"].ToString();
     bool Timepass = false;
     int nowtime = 0;
     int uplen = ts.Length * 80 / 100;
     if (nowstr != "")
     {
         nowtime = Int32.Parse(nowstr);
     }
     int Typetime = 1800 - nowtime;
     if (Typetime > 10)
     {
         Timepass = true;
     }
     else
     {
         Timepass = false;
     }
     if (Timepass)
     {
         if (Int32.Parse(rightword) > uplen)
         {
             int Ptid = Int32.Parse(LTid.Text);
             int Pscore = Int32.Parse(TypeScore.Trim());
             DateTime Pdate = DateTime.Now;
             LearnSite.Model.Ptyper pmodel = new LearnSite.Model.Ptyper();
             pmodel.Pdate = Pdate;
             pmodel.Pip = Pip;
             pmodel.Pscore = Pscore;
             pmodel.Psnum = Psnum;
             pmodel.Ptid = Ptid;
             pmodel.Ptype = 1;
             LearnSite.BLL.Ptyper pt = new LearnSite.BLL.Ptyper();
             if (pt.ExistsPsnum(Psnum))
             {
                 pt.Update(pmodel);
             }
             else
             {
                 pt.Add(pmodel);
             }
             Labelmsg.Text = "输入" + rightword + "个汉字" + " 用时" + Typetime.ToString() + "秒";
             BtnType.Text = "成绩记录成功!";
             BtnType.Enabled = false;
         }
         else
         {
             Labelmsg.Text = "字数太少不作记录" + " 用时" + Typetime.ToString() + "秒";
         }
         System.Threading.Thread.Sleep(500);
         showtyper();
     }
     else
     {
         Labelmsg.Text = "打字时间太短不作记录" + " 用时" + Typetime.ToString() + "秒";
         BtnType.Text = "成绩记录失败!";
     }
 }
示例#18
0
 private void ShowTyper()
 {
     LearnSite.BLL.Ptyper pr = new LearnSite.BLL.Ptyper();
     GVTyper.DataSource = pr.ShowAllTypeScore();
     GVTyper.DataBind();
 }
示例#19
0
 protected void ButtonClearType_Click(object sender, EventArgs e)
 {
     LearnSite.BLL.Ptyper pbll = new LearnSite.BLL.Ptyper();
     pbll.DeleteAll();
     ButtonClearType.Enabled = false;
 }