protected void btnDelete_Click(object sender, EventArgs e) { this.ChkAdminLevel("sys_channel_manage", DTEnums.ActionEnum.Delete.ToString()); int num1 = 0; int num2 = 0; Rain.BLL.channel channel = new Rain.BLL.channel(); for (int index = 0; index < this.rptList.Items.Count; ++index) { int int32 = Convert.ToInt32(((HiddenField)this.rptList.Items[index].FindControl("hidId")).Value); if (((CheckBox)this.rptList.Items[index].FindControl("chkId")).Checked) { if (new Rain.BLL.article().GetCount("channel_id=" + (object)int32) > 0) { ++num2; } else { Rain.Model.channel model = channel.GetModel(int32); if (channel.Delete(int32)) { ++num1; new Rain.BLL.url_rewrite().Remove("channel", model.name); } else { ++num2; } } } } this.AddAdminLog(DTEnums.ActionEnum.Delete.ToString(), "删除频道成功" + (object)num1 + "条,失败" + (object)num2 + "条"); this.JscriptMsg("删除成功" + (object)num1 + "条,失败" + (object)num2 + "条!", Utils.CombUrlTxt("channel_list.aspx", "site_id={0}&keywords={1}", this.site_id.ToString(), this.keywords), "parent.loadMenuTree"); }
public bool Update(Rain.Model.channel model) { return(this.dal.Update(model)); }
public int Add(Rain.Model.channel model) { return(this.dal.Add(model)); }