Example #1
0
    private void ShowTyperDetails()
    {
        int Nid = Int32.Parse(Request.QueryString["Nid"].ToString());

        LearnSite.Model.Chinese cmodel = new LearnSite.Model.Chinese();
        LearnSite.BLL.Chinese   cbll   = new LearnSite.BLL.Chinese();
        cmodel        = cbll.GetModel(Nid);
        Ttitle.Text   = cmodel.Ntitle;
        Tcontent.Text = cmodel.Ncontent;
    }
Example #2
0
    protected void BtnEdit_Click(object sender, EventArgs e)
    {
        int Nid = Int32.Parse(Request.QueryString["Nid"].ToString());

        LearnSite.Model.Chinese cmodel = new LearnSite.Model.Chinese();
        cmodel.Ncontent = Tcontent.Text;
        cmodel.Nid      = Nid;
        cmodel.Ntitle   = Ttitle.Text.Trim();
        LearnSite.BLL.Chinese cbll = new LearnSite.BLL.Chinese();
        if (Ttitle.Text.Length > 1 && Tcontent.Text.Length > 1)
        {
            cbll.Update(cmodel);
            System.Threading.Thread.Sleep(200);
            string url = "~/Teacher/typechineseshow.aspx?Nid=" + Nid;
            Response.Redirect(url, false);
        }
    }
Example #3
0
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     if (Ttitle.Text != "" && Tcontent.Text != "")
     {
         LearnSite.Model.Chinese cmodel = new LearnSite.Model.Chinese();
         cmodel.Ntitle   = Ttitle.Text.Trim();
         cmodel.Ncontent = Tcontent.Text;
         LearnSite.BLL.Chinese bll = new LearnSite.BLL.Chinese();
         int Nid = bll.Add(cmodel);
         System.Threading.Thread.Sleep(200);
         string url = "~/Teacher/TypeChineseShow.aspx?Nid=" + Nid;
         Response.Redirect(url, false);
     }
     else
     {
         Labelmsg.Text = "请输入拼音词语标题及内容!";
     }
 }
Example #4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(LearnSite.Model.Chinese model)
 {
     return(dal.Update(model));
 }
Example #5
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(LearnSite.Model.Chinese model)
 {
     return(dal.Add(model));
 }