private void Delete() { ContainerType type = ContainerType.GetByKey(Convert.ToChar(txtTypeCodeDisable.Text)); if (type != null) { if (type.Delete(HyperCatalog.Shared.SessionState.User.Id)) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "clientScript", "<script>back();</script>"); } else { lbError.CssClass = "hc_error"; lbError.Text = ContainerType.LastError; lbError.Visible = true; } } else { lbError.CssClass = "hc_error"; lbError.Text = "Error: Container type is null"; lbError.Visible = true; } }