private void btnActualizar_Click(object sender, EventArgs e) { if (this.GrillaCategorias.SelectedRows != null) { int categoriaId = Int32.Parse(this.GrillaCategorias.SelectedRows[0].Cells["id"].Value.ToString()); FrmDialogCategorias form = new FrmDialogCategorias(); form.idcategoria = categoriaId; form.tipooperacion = "U"; var result = form.ShowDialog(); if (result == DialogResult.OK) { this.CargarGrilla(); } } else { MessageBox.Show("Seleccione un objeto de la Lista", "InformaciĆ³n", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
private void btn_nuevacategoria_Click(object sender, EventArgs e) { FrmDialogCategorias form = new FrmDialogCategorias(); form.tipooperacion = "N"; var result = form.ShowDialog(); if (result == DialogResult.OK) { this.CargarGrilla(); } }
private void DataGridSedes_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0) { int id = int.Parse(this.GrillaCategorias.Rows[e.RowIndex].Cells["id"].Value.ToString()); FrmDialogCategorias form = new FrmDialogCategorias(); form.idcategoria = id; form.tipooperacion = "V"; var result = form.ShowDialog(); if (result == DialogResult.OK) { this.CargarGrilla(); } } }