コード例 #1
0
        private void btnModificar2_Click(object sender, EventArgs e)
        {
            try
            {
                if (ValidarCampos())
                {
                    Editorial edito = (Editorial)lstEditorial.SelectedItem;
                    if (edito != null)
                    {
                        int       index = lstEditorial.SelectedIndex;
                        Editorial ed    = ObtenerEditorialFormulario();
                        Editorial.EditarEditorial(index, ed);


                        LimpiarFormulario();
                        ActualizarListaEditoriales();
                    }
                    else
                    {
                        MessageBox.Show("Ojo, Selecciona un Item");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
コード例 #2
0
        private void BtnModificar_Click(object sender, EventArgs e)
        {
            int       index = lstEditorial.SelectedIndex;
            Editorial ed    = ObtenerEdi();

            Editorial.EditarEditorial(index, ed);

            Limpiar();
            ActualizarLista();
        }