private void bEdit_Click(object sender, EventArgs e) { formConsultaUsuarios aux; foreach (ListViewItem item in this.lBoxData.SelectedItems) { aux = new formConsultaUsuarios(this.Text + " - Editar Registro", this.Icon, data.GetRegistry(item.Index)); aux.ShowDialog(); if (aux.getData() != null) { if (tbSearch.Text != "") { this.data.ModifyRegistry(getRealIndex(item), aux.getData()); } else this.data.ModifyRegistry(item.Index, aux.getData()); } } LoadData(); }
private void bAnhadir_Click(object sender, EventArgs e) { formConsultaUsuarios aux; aux = new formConsultaUsuarios(this.Text + " - Nuevo Registro", this.Icon); aux.ShowDialog(); if (aux.getData() != null) { data.AddNewRegistry(aux.getData()); } LoadData(); }