Example #1
0
    /// <summary>
    /// 指定打字范文
    /// </summary>
    private void showsimple()
    {
        string Tid = Request.QueryString["Tid"].ToString();

        if (LearnSite.Common.WordProcess.IsNum(Tid))
        {
            LearnSite.Model.Typer tmodel = new LearnSite.Model.Typer();
            LearnSite.BLL.Typer   tp     = new LearnSite.BLL.Typer();
            tmodel = tp.GetModel(Int32.Parse(Tid));

            LTid.Text   = Tid;
            Ttitle.Text = tmodel.Ttitle;
            string str = tmodel.Tcontent;
            int    ln  = str.Length;
            int    lim = 210;
            if (ln > lim)
            {
                Literal1.Text = str.Substring(0, lim);
            }
            else
            {
                Literal1.Text = str;
            }
        }
    }
Example #2
0
 protected void LinkBtnDel_Click(object sender, EventArgs e)
 {
     int Tid = Int32.Parse(Request.QueryString["Tid"].ToString());
     LearnSite.BLL.Typer typebll = new LearnSite.BLL.Typer();
     typebll.Delete(Tid);
     System.Threading.Thread.Sleep(1000);
     string url = "~/Teacher/typer.aspx";
     Response.Redirect(url, false);
 }
Example #3
0
 private void ShowType()
 {
     if (Request.QueryString["Tid"] != null)
     {
         int Tid = Int32.Parse(Request.QueryString["Tid"].ToString());
         LearnSite.BLL.Typer typerbll = new LearnSite.BLL.Typer();
         Repeater1.DataSource = typerbll.GetOneArticle(Tid);
         Repeater1.DataBind();
     }
 }
Example #4
0
 private void ShowType()
 {
     if (Request.QueryString["Tid"] != null)
     {
         int Tid = Int32.Parse(Request.QueryString["Tid"].ToString());
         LearnSite.BLL.Typer typerbll = new LearnSite.BLL.Typer();
         Repeater1.DataSource = typerbll.GetOneArticle(Tid);
         Repeater1.DataBind();
     }
 }
 private void showtitle()
 {
     if (!string.IsNullOrEmpty(Request.QueryString["Tid"]))
     {
         int Ptid = Int32.Parse(Request.QueryString["Tid"].ToString());
         LearnSite.BLL.Typer tbll = new LearnSite.BLL.Typer();
         string title             = tbll.GetTitle(Ptid);
         Labeltitle.Text = "《" + title + "》";
     }
 }
Example #6
0
 private void ShowTyperDetails()
 {
     int Tid =Int32.Parse( Request.QueryString["Tid"].ToString());
     LearnSite.Model.Typer typer = new LearnSite.Model.Typer();
     LearnSite.BLL.Typer typerbll = new LearnSite.BLL.Typer();
     typer = typerbll.GetModel(Tid);
     DDLtype.SelectedValue = typer.Ttype.ToString();
     DDLuse.SelectedValue = typer.Tuse.ToString();
     Ttitle.Text = typer.Ttitle;
     Tcontent.Text = typer.Tcontent;
 }
Example #7
0
    protected void LinkBtnDel_Click(object sender, EventArgs e)
    {
        int Tid = Int32.Parse(Request.QueryString["Tid"].ToString());

        LearnSite.BLL.Typer typebll = new LearnSite.BLL.Typer();
        typebll.Delete(Tid);
        System.Threading.Thread.Sleep(1000);
        string url = "~/Teacher/typer.aspx";

        Response.Redirect(url, false);
    }
Example #8
0
    private void ShowTyperDetails()
    {
        int Tid = Int32.Parse(Request.QueryString["Tid"].ToString());

        LearnSite.Model.Typer typer    = new LearnSite.Model.Typer();
        LearnSite.BLL.Typer   typerbll = new LearnSite.BLL.Typer();
        typer = typerbll.GetModel(Tid);
        DDLtype.SelectedValue = typer.Ttype.ToString();
        DDLuse.SelectedValue  = typer.Tuse.ToString();
        Ttitle.Text           = typer.Ttitle;
        Tcontent.Text         = typer.Tcontent;
    }
Example #9
0
    private void ListTypeArticle()
    {
        string Hid = tcook.Hid.ToString();

        if (Session[Hid + "TyperPageIndex"] != null)
        {
            GVType.PageIndex = Int32.Parse(Session[Hid + "TyperPageIndex"].ToString());
        }
        LearnSite.BLL.Typer bll = new LearnSite.BLL.Typer();
        GVType.DataSource = bll.GetListArticle();
        GVType.DataBind();
    }
Example #10
0
    private void ListTypeArticle()
    {
        string Hid = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();

        if (Session[Hid + "TyperPageIndex"] != null)
        {
            GVType.PageIndex = Int32.Parse(Session[Hid + "TyperPageIndex"].ToString());
        }
        LearnSite.BLL.Typer bll = new LearnSite.BLL.Typer();
        GVType.DataSource = bll.GetListArticle();
        GVType.DataBind();
    }
Example #11
0
    private void ShowSelect()
    {
        string hid    = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();
        string Rgrade = DDLgrade.SelectedValue;

        if (Rgrade != "")
        {
            LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
            LabelTids.Text = rbll.GetRtyper(Int32.Parse(Rgrade), Int32.Parse(hid));//要放在文章标题获取之前
        }
        LearnSite.BLL.Typer tbll = new LearnSite.BLL.Typer();
        DataListTyper.DataSource = tbll.ShowAllTitle();
        DataListTyper.DataBind();
    }
Example #12
0
    private void ShowSelect()
    {
        string hid    = tcook.Hid.ToString();
        string Rgrade = DDLgrade.SelectedValue;

        if (Rgrade != "")
        {
            LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
            LabelTids.Text = rbll.GetRtyper(Int32.Parse(Rgrade), Int32.Parse(hid));//要放在文章标题获取之前
        }
        LearnSite.BLL.Typer tbll = new LearnSite.BLL.Typer();
        DataListTyper.DataSource = tbll.ShowAllTitle();
        DataListTyper.DataBind();
    }
Example #13
0
 protected void BtnEdit_Click(object sender, EventArgs e)
 {
     int Tid = Int32.Parse(Request.QueryString["Tid"].ToString());
     LearnSite.Model.Typer typer = new LearnSite.Model.Typer();
     typer.Tcontent = Tcontent.Text.Trim();
     typer.Tid = Tid;
     typer.Ttitle = Ttitle.Text.Trim();
     typer.Ttype =Int32.Parse( DDLtype.SelectedValue);
     typer.Tuse = Int32.Parse(DDLuse.SelectedValue);
     LearnSite.BLL.Typer typerbll = new LearnSite.BLL.Typer();
     if (typer.Ttitle.Length > 1 && typer.Tcontent.Length > 1)
     {
         typerbll.Update(typer);
         System.Threading.Thread.Sleep(1000);
         string url = "~/Teacher/TypeShow.aspx?Tid=" + Tid;
         Response.Redirect(url, false);
     }
 }
Example #14
0
    protected void BtnEdit_Click(object sender, EventArgs e)
    {
        int Tid = Int32.Parse(Request.QueryString["Tid"].ToString());

        LearnSite.Model.Typer typer = new LearnSite.Model.Typer();
        typer.Tcontent = Tcontent.Text.Trim();
        typer.Tid      = Tid;
        typer.Ttitle   = Ttitle.Text.Trim();
        typer.Ttype    = Int32.Parse(DDLtype.SelectedValue);
        typer.Tuse     = Int32.Parse(DDLuse.SelectedValue);
        LearnSite.BLL.Typer typerbll = new LearnSite.BLL.Typer();
        if (typer.Ttitle.Length > 1 && typer.Tcontent.Length > 1)
        {
            typerbll.Update(typer);
            System.Threading.Thread.Sleep(200);
            string url = "~/Teacher/TypeShow.aspx?Tid=" + Tid;
            Response.Redirect(url, false);
        }
    }
Example #15
0
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     if (Ttitle.Text != "" && Tcontent.Text != "")
     {
         LearnSite.Model.Typer typer = new LearnSite.Model.Typer();
         typer.Tcontent = Tcontent.Text.Trim();
         typer.Ttitle = Ttitle.Text.Trim();
         typer.Ttype = Int32.Parse(DDLtype.SelectedValue);
         typer.Tuse = Int32.Parse(DDLuse.SelectedValue);
         LearnSite.BLL.Typer typerbll = new LearnSite.BLL.Typer();
         int Tid = typerbll.Add(typer);
         System.Threading.Thread.Sleep(1000);
         string url = "~/Teacher/TypeShow.aspx?Tid=" + Tid;
         Response.Redirect(url, false);
     }
     else
     {
         Labelmsg.Text = "请输入文章标题及内容!";
     }
 }
Example #16
0
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     if (Ttitle.Text != "" && Tcontent.Text != "")
     {
         LearnSite.Model.Typer typer = new LearnSite.Model.Typer();
         int limlen = 210;
         typer.Tcontent = ClearHtml(Tcontent.Text.Trim(), limlen);
         typer.Ttitle   = Ttitle.Text.Trim();
         typer.Ttype    = 11;
         typer.Tuse     = 1;
         LearnSite.BLL.Typer typerbll = new LearnSite.BLL.Typer();
         int Tid = typerbll.Add(typer);
         System.Threading.Thread.Sleep(200);
         string url = "~/Teacher/TypeShow.aspx?Tid=" + Tid;
         Response.Redirect(url, false);
     }
     else
     {
         Labelmsg.Text = "请输入文章标题及内容!";
     }
 }
Example #17
0
 /// <summary>
 /// 随机打字范文
 /// </summary>
 private void showrndsimple()
 {
     LearnSite.Model.Typer tmodel = new LearnSite.Model.Typer();
     LearnSite.BLL.Typer   tp     = new LearnSite.BLL.Typer();
     tmodel = tp.GetModelRnd(Labeltids.Text);
     if (tmodel != null)
     {
         LTid.Text   = tmodel.Tid.ToString();
         Ttitle.Text = tmodel.Ttitle;
         string str = tmodel.Tcontent;
         int    ln  = str.Length;
         int    lim = 210;
         if (ln > lim)
         {
             Literal1.Text = str.Substring(0, lim);
         }
         else
         {
             Literal1.Text = str;
         }
     }
 }
Example #18
0
    /// <summary>
    /// 指定打字范文
    /// </summary>
    private void showsimple()
    {
        string Tid = Request.QueryString["Tid"].ToString();
        if (LearnSite.Common.WordProcess.IsNum(Tid))
        {
            LearnSite.Model.Typer tmodel = new LearnSite.Model.Typer();
            LearnSite.BLL.Typer tp = new LearnSite.BLL.Typer();
            tmodel = tp.GetModel(Int32.Parse(Tid));

            LTid.Text = Tid;
            Ttitle.Text = tmodel.Ttitle;
            string str = tmodel.Tcontent;
            int ln = str.Length;
            int lim = 210;
            if (ln > lim)
            {
                ts = str.Substring(0, lim);
            }
            else
            {
                ts = str;
            }
        }
    }
Example #19
0
 /// <summary>
 /// 随机打字范文
 /// </summary>
 private void showrndsimple()
 {
     LearnSite.Model.Typer tmodel = new LearnSite.Model.Typer();
     LearnSite.BLL.Typer tp = new LearnSite.BLL.Typer();
     tmodel = tp.GetModelRnd();
     if (tmodel != null)
     {
         LTid.Text = tmodel.Tid.ToString();
         Ttitle.Text = tmodel.Ttitle;
         string str = tmodel.Tcontent;
         int ln = str.Length;
         int lim = 210;
         if (ln > lim)
         {
             ts = str.Substring(0, lim);
         }
         else
         {
             ts = str;
         }
     }
     else
     {
         BtnType.Enabled = false;
         BtnType.Text = "没有文章";
     }
 }
Example #20
0
 private void showalltid()
 {
     LearnSite.BLL.Typer tp = new LearnSite.BLL.Typer();
     DLTid.DataSource = tp.ShowAllTid();
     DLTid.DataBind();
 }
Example #21
0
 private void showalltid()
 {
     LearnSite.BLL.Typer tp = new LearnSite.BLL.Typer();
     DLTid.DataSource = tp.ShowAllTid(Labeltids.Text);
     DLTid.DataBind();
 }
Example #22
0
 private void ListTypeArticle()
 {
     string Hid = Request.Cookies["TeacherCookies"].Values["Hid"].ToString();
     if (Session[Hid+"TyperPageIndex"] != null)
         GVType.PageIndex = Int32.Parse(Session[Hid+"TyperPageIndex"].ToString());
     LearnSite.BLL.Typer bll = new LearnSite.BLL.Typer();
     GVType.DataSource = bll.GetListArticle();
     GVType.DataBind();
 }