private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if ((e.ColumnIndex == 0) && (e.RowIndex >= 0)) { DataTable dt = new DataTable(); Detalles_Poliza detalles = new Detalles_Poliza(this.cnn); String Transaccion = this.dataGridView1.CurrentRow.Cells["NO_TRANSACCION"].Value.ToString(); string tipo = this.dataGridView1.CurrentRow.Cells["TIPO_OPERACION"].Value.ToString(); DateTime FECHA_PERIODO = DateTime.Parse(this.dataGridView1.CurrentRow.Cells["FECHA_PERIODO"].Value.ToString()); if (!(tipo == "")) { dt = detalles.detalles_Mov_linea(Transaccion, tipo); if (dt.Rows.Count > 0) { new frmDetalles_Mov_linea(this.cnn, dt, FECHA_PERIODO).ShowDialog(); } } } }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if ((e.ColumnIndex == 1) && (e.RowIndex >= 0)) { DataTable dt = new DataTable(); Detalles_Poliza detalles = new Detalles_Poliza(this.cnn); String Banco = this.dataGridView1.CurrentRow.Cells["BANK_ACCOUNT_ID"].Value.ToString(); string Control = this.dataGridView1.CurrentRow.Cells["CONTROL_NO"].Value.ToString(); string CUENTA_ORIGEN = this.dataGridView1.CurrentRow.Cells["CUENTA"].Value.ToString(); string CUENTA_DESTINO = this.dataGridView1.CurrentRow.Cells["CUENTA_TRASLADO"].Value.ToString(); string tipo = this.dataGridView1.CurrentRow.Cells["TIPO_OPERACION"].Value.ToString(); //string site_Id = ""; if (!(tipo == "")) { dt = detalles.detalles(tipo, CUENTA_ORIGEN, CUENTA_DESTINO, FECHA_PERIODO.Month, FECHA_PERIODO.Year, false, Banco, Control, ""); if (dt.Rows.Count > 0) { new frmDetalles(dt).ShowDialog(); } } } }