currentContext.SaveChanges();
LinkButton btnDelete = (LinkButton)e.Item.FindControl("btnDelete"); if (btnDelete != null) { if (this.ReadOnly) { btnDelete.Visible = false; } else { btnDelete.Visible = true; if (thisContact.UserDetails != null && thisContact.UserDetails.Count > 0) { btnDelete.CommandName = "CannotDelete"; btnDelete.OnClientClick = "return window.alert('This contact cannot be deleted as there is a user login record using it')"; } else { btnDelete.OnClientClick = "return window.confirm('Are you sure you want to delete this staff contact?')"; } btnDelete.CommandArgument = thisContact.ContactID.ToString(); if (thisContact.ContactID == SessionContents.CurrentUser.ContactID) { btnDelete.Visible = false; } } }
SchoolContact
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)