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); }
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; }
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(); } }
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(); }
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(); }
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(); }
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(); }
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; } }
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; } }
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); } }
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 = "请输入拼音词语标题及内容!"; } }