private void InitDosificacion( ) { CommonUtils.ConexionBD.StringDeConexion = CommonUtils.ConexionBD.GetConnectionString( ); string sqlQuery = "Select * FROM Caja WHERE (CajaId = (SELECT MAX(CajaId) FROM Caja))"; DataTable tableTemp = CommonUtils.ConexionBD.EjecutarConsulta(sqlQuery); int rows = tableTemp.Rows.Count; if (rows == 0) { InitCajaForm cajaform = new InitCajaForm( ); cajaform.ShowDialog( ); cajaform.Refresh( ); } CommonUtils.ConexionBD.CerrarConexion( ); }
private void InitDosificacion( ) { CommonUtils.ConexionBD.StringDeConexion = CommonUtils.ConexionBD.GetConnectionString( ); string sqlQuery = "Select * FROM Caja WHERE (CajaId = (SELECT MAX(CajaId) FROM Caja))"; DataTable tableTemp = CommonUtils.ConexionBD.EjecutarConsulta( sqlQuery ); int rows = tableTemp.Rows.Count; if ( rows == 0 ) { InitCajaForm cajaform = new InitCajaForm( ); cajaform.ShowDialog( ); cajaform.Refresh( ); } CommonUtils.ConexionBD.CerrarConexion( ); }