private void btnAddExp_Click(object sender, EventArgs e) { var cap = new ExperienciaLaboralViewModel(); var frm = new workExperiencia() { Editing = false, CedulaCandidato = Candidato.Cedula, ExperienciaLab = cap }; frm.ShowDialog(); if (frm.SaveData) { dictionaryExp.Add(dictionaryExp.Count + 1, cap); } fillExperiencia(); }
private void DgvExpLaboral_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { var id = int.Parse(dgvExpLaboral.Rows[e.RowIndex].Cells["ID"].Value.ToString()); var c = dictionaryExp[id].Adapt <ExperienciaLaboralViewModel>(); idCurrentExp = id; var frm = new workExperiencia() { Editing = true, CedulaCandidato = Candidato.Cedula, ExperienciaLab = c }; frm.DeletingExpEvent += DeleteExp; frm.ShowDialog(); frm.DeletingExpEvent -= DeleteExp; if (frm.SaveData) { dictionaryExp[id] = c; } fillExperiencia(); }