using System; using System.Data; using System.Configuration; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using EduNet.Model; using EduNet.BLL; using System.Data.SqlClient; namespace Web.PublicCode { /// <summary> /// 删除资源类 /// </summary> public class ResourceDeleteService { private delegate void DeleteResourceDelegate(int resourceid); DeleteResourceDelegate DeleteResourceHandler; public ResourceDeleteService() { DeleteResourceHandler = new DeleteResourceDelegate(DeleteResourceProc); DeleteResourceHandler += new DeleteResourceDelegate(delegate(int resourceid){ string dd = "ccccc"; }); DeleteResourceHandler += new DeleteResourceDelegate((int resource)=>DeleteResource(resource)); } public void DeleteResource(int resourceid) { DeleteResourceHandler(resourceid); } /// <summary> /// 删除资源 /// </summary> /// <param name="resourceid"></param> public void DeleteResourceProc(int resourceid) { Model_tb_OrganResource orgResource = new Model_tb_OrganResource(); orgResource.ResourceID = resourceid; orgResource = new BLL_tb_OrganResource().GetModel(orgResource); if (null == orgResource) return; } } }