예제 #1
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            var          form = new asunto_new_update(0, this);
            DialogResult vr   = form.ShowDialog(this);

            if (vr == System.Windows.Forms.DialogResult.OK)
            {
                this.handlePaginacion();
            }
        }
예제 #2
0
        private void btnModificar_Click(object sender, EventArgs e)
        {
            Int32 selectedRowCount = dataAsuntos.Rows.GetRowCount(DataGridViewElementStates.Selected);

            if (selectedRowCount != 1)
            {
                var form2 = new frmAlert(this, "Seleccionar asunto", "Debe seleccionar un asunto para modificar", "close");
                form2.Show();
                return;
            }
            int          id   = Convert.ToInt32(this.dataAsuntos.SelectedRows[0].Cells[2].Value);
            var          form = new asunto_new_update(id, this);
            DialogResult vr   = form.ShowDialog(this);

            if (vr == System.Windows.Forms.DialogResult.OK)
            {
                this.actualizarAsuntos();
            }
        }