private void lueSacramentos_TextChanged(object sender, EventArgs e) { if (lueSacramentos.ItemIndex == 0) { labelControl11.Visible = txtNotaMarginal.Visible = true; } else if (lueSacramentos.ItemIndex == 1) { camposActivos(false); labelControl11.Visible = txtNotaMarginal.Visible = !true; } else if (lueSacramentos.ItemIndex == 3) { FrmMatrimonio frm = new FrmMatrimonio(); frm.idSacramento = 4; frm.ShowDialog(); frm.Focus(); Limpiar(); LlenarCombobox(); LlenarGridSacramentos(); HabilitarControles(true, false, false, false, false, true); labelControl11.Visible = txtNotaMarginal.Visible = !true; } else { labelControl11.Visible = txtNotaMarginal.Visible = !true; camposActivos(true); } }
private void editarToolStripMenuItem_Click(object sender, EventArgs e) { String sacramento = gvDatosSacramentos.GetRowCellValue(gvDatosSacramentos.FocusedRowHandle, colSacramento).ToString(); int id = int.Parse(gvDatosSacramentos.GetRowCellValue(gvDatosSacramentos.FocusedRowHandle, colIdRegistroSacramento).ToString()); int idSacramento = int.Parse(gvDatosSacramentos.GetRowCellValue(gvDatosSacramentos.FocusedRowHandle, colIdSacramento).ToString()); if (sacramento != "Matrimonio") { MostrarUnSacramento(id); HabilitarControles(false, false, true, true, true, false); slueFeligres.Enabled = false; } else { FrmMatrimonio frm = new FrmMatrimonio(); frm.idRegistro = id; frm.idSacramento = idSacramento; frm.nuevoRegistro = false; frm.ShowDialog(); frm.Focus(); Limpiar(); LlenarGridSacramentos(); LlenarCombobox(); HabilitarControles(true, false, false, false, false, true); } padrinoAnterior = sluePadrino.EditValue.ToString(); madrinaAnterior = slueMadrina.EditValue.ToString(); }