private Poliza getPolizaSelected() { DataGridViewRow row = getRowSelected(polizaDataGridView); Poliza poliza = new Poliza(); poliza.id = toInt(row.Cells[0].Value); poliza.idCliente = toInt(row.Cells[1].Value); poliza.importe = toFloat(row.Cells[2].Value); poliza.fecha = toString(row.Cells[3].Value); poliza.estado = toString(row.Cells[4].Value); poliza.observaciones = toString(row.Cells[5].Value); return(poliza); }
private void polizaDataGridView_RowStateChanged(object sender, DataGridViewRowStateChangedEventArgs e) { if (polizaDataGridView != null && polizaDataGridView.SelectedRows.Count > 0) { currentPolizaSelected = getPolizaSelected(); pagoBindingSource.Filter = "id_poliza = '" + currentPolizaSelected.id + "'"; //lblCliente.Text = currentClientSelected.nombre.ToUpper(); /*if(currentPolizaSelected.id == -1 && tabMain.TabPages.Contains(tabPagos)) { * * tabMain.TabPages.Remove(tabPagos); * * } else { * * if(!tabMain.TabPages.Contains(tabPagos)) * tabMain.TabPages.Add(tabPagos); * * }*/ //currentRowSelected = clienteDataGridView.CurrentCell.RowIndex; } }