コード例 #1
0
        private void btnVerMascotas_Click(object sender, EventArgs e)
        {
            if (listamascota == null)
            {
                Cliente cli = new Cliente();

                if (dgvClientes.RowCount == 0)
                {
                    MessageBox.Show("No hay Clientes cargados", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                else
                {
                    cli                      = (Cliente)dgvClientes.CurrentRow.DataBoundItem;
                    listamascota             = new frmListaMascotas(cli);
                    listamascota.MdiParent   = this.MdiParent;
                    listamascota.FormClosed += new FormClosedEventHandler(ListaMascotaFormClosed);
                    listamascota.Show();
                }
            }
        }
コード例 #2
0
 void ListaMascotaFormClosed(object sender, EventArgs e)
 {
     listamascota = null;
 }