protected void lbtnDelete_Click(object sender, EventArgs e) { string code = ((LinkButton)sender).CommandArgument; try { TheRoleMgr.DeleteRole(code); ShowSuccessMessage("Security.Role.DeleteRole.Successfully", code); UpdateView(); } catch (Castle.Facilities.NHibernateIntegration.DataException ex) { ShowErrorMessage("Security.Role.DeleteRole.Fail", code); } }