Exemplo n.º 1
0
 protected void LinkBtnDel_Click(object sender, EventArgs e)
 {
     int Nid = Int32.Parse(Request.QueryString["Nid"].ToString());
     LearnSite.BLL.Chinese cbll = new LearnSite.BLL.Chinese();
     cbll.Delete(Nid);
     System.Threading.Thread.Sleep(500);
     string url = "~/Teacher/typechinese.aspx";
     Response.Redirect(url, false);
 }
Exemplo n.º 2
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;
    }
Exemplo n.º 3
0
 private void ShowChinese()
 {
     if (Request.QueryString["Nid"] != null)
     {
         int Nid = Int32.Parse(Request.QueryString["Nid"].ToString());
         LearnSite.BLL.Chinese cbll = new LearnSite.BLL.Chinese();
         Repeater1.DataSource = cbll.GetOneChinese(Nid);
         Repeater1.DataBind();
     }
 }
Exemplo n.º 4
0
    private void ListTypeChinese()
    {
        string Hid = Request.Cookies[LearnSite.Common.CookieHelp.teaCookieNname].Values["Hid"].ToString();

        if (Session[Hid + "ChinesePageIndex"] != null)
        {
            GVType.PageIndex = Int32.Parse(Session[Hid + "ChinesePageIndex"].ToString());
        }
        LearnSite.BLL.Chinese bll = new LearnSite.BLL.Chinese();
        GVType.DataSource = bll.GetListTitle();
        GVType.DataBind();
    }
Exemplo n.º 5
0
    private void ListTypeChinese()
    {
        LearnSite.Model.TeaCook tcook = new LearnSite.Model.TeaCook();
        string Hid = tcook.Hid.ToString();

        if (Session[Hid + "ChinesePageIndex"] != null)
        {
            GVType.PageIndex = Int32.Parse(Session[Hid + "ChinesePageIndex"].ToString());
        }
        LearnSite.BLL.Chinese bll = new LearnSite.BLL.Chinese();
        GVType.DataSource = bll.GetListTitle();
        GVType.DataBind();
    }
Exemplo n.º 6
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.GetRchinese(Int32.Parse(Rgrade), Int32.Parse(hid));//要放在文章标题获取之前
        }

        LearnSite.BLL.Chinese cbll = new LearnSite.BLL.Chinese();
        DataListTyper.DataSource = cbll.GetListTitle();
        DataListTyper.DataBind();
    }
Exemplo n.º 7
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.GetRchinese(Int32.Parse(Rgrade), Int32.Parse(hid));//要放在文章标题获取之前
        }

        LearnSite.BLL.Chinese cbll = new LearnSite.BLL.Chinese();
        DataListTyper.DataSource = cbll.GetListTitle();
        DataListTyper.DataBind();
    }
Exemplo n.º 8
0
    private void showChinese()
    {
        LearnSite.Model.Cook cook = new LearnSite.Model.Cook();

        LearnSite.BLL.Room rbll = new LearnSite.BLL.Room();
        string             Nids = rbll.GetRchineseByClass(cook.Sgrade, cook.Sclass);

        LearnSite.BLL.Chinese cbll = new LearnSite.BLL.Chinese();
        DataList1.DataSource = cbll.ShowAllNid(Nids);
        DataList1.DataBind();
        if (DataList1.Items.Count > 0)
        {
            Lbnid.Text = ((Label)DataList1.Items[0].FindControl("Lbid")).Text;
        }
    }
Exemplo n.º 9
0
    private void showChinese()
    {
        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.Room rbll = new LearnSite.BLL.Room();
        string             Nids = rbll.GetRchineseByClass(Sgrade, Sclass);

        LearnSite.BLL.Chinese cbll = new LearnSite.BLL.Chinese();
        DataList1.DataSource = cbll.ShowAllNid(Nids);
        DataList1.DataBind();
        if (DataList1.Items.Count > 0)
        {
            Lbnid.Text = ((Label)DataList1.Items[0].FindControl("Lbid")).Text;
        }
    }
Exemplo n.º 10
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);
        }
    }
Exemplo n.º 11
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 = "请输入拼音词语标题及内容!";
     }
 }