protected virtual void FireAfterRemoveGroup(RemoveGroupEventArgs e) { if (AfterRemoveGroup != null) { AfterRemoveGroup(this, e); } }
public void RemoveGroup(int GroupId) { RemoveGroupEventArgs e = new RemoveGroupEventArgs(); e.GroupId = GroupId; FireBeforeRemoveGroup(e); if (!e.Cancel) { SqlHelper.ExecuteNonQuery( "delete from cmsMember2MemberGroup where member = @id and Membergroup = @groupId", SqlHelper.CreateParameter("@id", Id), SqlHelper.CreateParameter("@groupId", GroupId)); populateGroups(); FireAfterRemoveGroup(e); } }
protected virtual void FireBeforeRemoveGroup(RemoveGroupEventArgs e) { if (BeforeRemoveGroup != null) { BeforeRemoveGroup(this, e); } }