protected void Btnadd_Click(object sender, EventArgs e) { string ytitle = TextBoxNewYtitle.Text.Trim(); if (!string.IsNullOrEmpty(ytitle)) { LearnSite.BLL.SoftCategory ybll = new LearnSite.BLL.SoftCategory(); LearnSite.Model.SoftCategory ymodel = new LearnSite.Model.SoftCategory(); ymodel.Ysort = ybll.GetMaxYsort(); ymodel.Ytitle = ytitle; ymodel.Ycontent = ""; ymodel.Yopen = false; //不限制 ybll.Add(ymodel); System.Threading.Thread.Sleep(500); showCategory(); TextBoxNewYtitle.Text = ""; } else { LearnSite.Common.WordProcess.Alert("请输入资源类别!", this.Page); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(LearnSite.Model.SoftCategory model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(LearnSite.Model.SoftCategory model) { return(dal.Add(model)); }