I have the following code:
private void lsvRecebeGrupoLayout_ItemChecked(object sender, ItemCheckedEventArgs e)
{
Layout lay = new Layout();
GrupoLayout grupo = new GrupoLayout();
RepositorioLayout repolay = new RepositorioLayout();
int idcbo = Convert.ToInt32(cboCarregaGrupo.SelectedValue);
foreach (ListViewItem x in lsvRecebeGrupoLayout.CheckedItems)
{
int idlayout = Convert.ToInt32(x.SubItems[0].Text);
lay = repolay.ConsultaPorId(idlayout);
grupo.Id = idcbo;
lay.GrupoLayout = grupo;
repolay.Alterar(lay);
}
}
This code checks a checkbox generated in a list view in C # windows forms, if this check is clicked it does an action to insert a given in a bank table. My question is how could I do it so that when I clicked on it again, I could insert new actions. Thanks.