protected void BtnDelete_Click(object sender, EventArgs e) { ScriptManager.RegisterStartupScript(this, this.GetType(), "reallowOp", "reallowOp();", true); ArrayList lista = new ArrayList(); //Recupero la lista delle note da rimuovere foreach (string id in this.CheckList) { foreach (NotaElenco n in this.ListaNote) { if (n.idNota == id) { lista.Add(n); } } } if (lista.Count > 0) { if (NoteManager.DeleteNoteInElenco((DocsPaWR.NotaElenco[])lista.ToArray(typeof(DocsPaWR.NotaElenco)))) { this.ListaNote = NoteManager.GetListaNote(ddlFiltroRf.SelectedItem.Value, txt_desc.Text, out numNote); this.BindGridAndSelect(); this.visib_pulsanti(true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "dialog", "ajaxDialogModal('ErrorManageNotesImpossibleToDelete', 'error', '');", true); return; } } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "dialog", "ajaxDialogModal('WarningManageNotesNoneSelected', 'warning', '');", true); return; } }