示例#1
0
    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);
        }
    }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(LearnSite.Model.SoftCategory model)
 {
     return(dal.Update(model));
 }
示例#3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(LearnSite.Model.SoftCategory model)
 {
     return(dal.Add(model));
 }