Exemple #1
0
        protected void SelectToEditItem()
        {
            try {
                int fila = DGV_Data.CurrentRow.Index;

                if (DGV_Data.Rows.Count != 0)
                {
                    id = Convert.ToInt32(DGV_Data.Rows[fila].Cells[0].Value);

                    FormClienteInsUp clienteInsUp = new FormClienteInsUp(id);
                    clienteInsUp.StartPosition = FormStartPosition.CenterScreen;
                    clienteInsUp.ShowInTaskbar = false;
                    clienteInsUp.ShowDialog();
                    id = 0;
                    MostrarTodoslosRegistrosCargados();
                }
                else
                {
                    MessageBox.Show("Debe seleccionar un elemento de la lista",
                                    "Información del Sistema",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            } catch (Exception ex) {
                MessageBox.Show(ex.Message, "Información del Sistema",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #2
0
        protected override void IconButton_Insertar_Click(object sender, EventArgs e)
        {
            Forms.FormClienteInsUp formClienteInsUp = new FormClienteInsUp();
            formClienteInsUp.ShowDialog();

            MostrarTodoslosRegistrosCargados();
        }