//保存修改 protected void btnSave_Click(object sender, EventArgs e) { model.Title = txtTitle.Text.Trim(); model.PageUrl = txtPageUrl.Text.Trim(); model.ClassOrder = int.Parse(txtClassOrder.Text.Trim()); //修改栏目 bll.Update(model); JscriptPrint("类别修改成功啦!", "List.aspx?kindId=" + kindId, "Success"); }
//保存修改 protected void btnSave_Click(object sender, EventArgs e) { model.Title = txtTitle.Text.Trim(); model.PageUrl = txtPageUrl.Text.Trim(); model.SortId = int.Parse(txtSortId.Text.Trim()); //修改栏目 bll.Update(model); //保存日志 SaveLogs("[栏目类别]修改类别:" + model.Title); JscriptPrint("类别修改成功啦!", "List.aspx?kindId=" + kindId, "Success"); }
protected void btnSave_Click(object sender, EventArgs e) { int classId; int parentId = int.Parse(this.lblPid.Text.Trim()); //上一级目录 int classLayer = 1; //栏目深度 string classList = ""; model.Title = this.txtTitle.Text.Trim(); model.ParentId = parentId; model.PageUrl = this.txtPageUrl.Text.Trim(); model.SortId = int.Parse(this.txtSortId.Text.Trim()); model.KindId = this.kindId; //添加栏目 classId = bll.Add(model); //修改栏目的下属栏目ID列表 if (parentId > 0) { DataSet ds = bll.GetChannelListByClassId(parentId); if (ds.Tables[0].Rows.Count > 0) { DataRow dr = ds.Tables[0].Rows[0]; classList = dr["ClassList"].ToString().Trim() + classId + ","; classLayer = Convert.ToInt32(dr["ClassLayer"]) + 1; } } else { classList = "," + classId + ","; classLayer = 1; } model.Id = classId; model.ClassList = classList; model.ClassLayer = classLayer; bll.Update(model); //保存日志 SaveLogs("[栏目类别]添加类别:" + model.Title); JscriptPrint("增加栏目成功啦!", "List.aspx?kindId=" + kindId, "Success"); }