Integration :
- lettura parametri macchina ora filtrata con Id configurazione corrente.
This commit is contained in:
@@ -802,13 +802,15 @@ namespace ib.essetre.integration.egaltech
|
||||
DataSet dsOffsets = new DataSet() ;
|
||||
|
||||
string sqlOffsets = "SELECT [group], [key], [value] " +
|
||||
"FROM [ESSETRE].[dbo].[vw_MachineParam] " +
|
||||
"WHERE [group] = 'OFFSETS' " ;
|
||||
"FROM [ESSETRE].[dbo].[vw_MachineParam] " +
|
||||
"WHERE [group] = 'OFFSETS' AND configurationId = @ConfigId" ;
|
||||
|
||||
// Connessione al DB ed esecuzione query
|
||||
using ( SqlConnection cn = new SqlConnection(_SqlConnectionStr)) {
|
||||
cn.Open() ;
|
||||
using ( SqlCommand cmd = new SqlCommand(sqlOffsets, cn)) {
|
||||
cmd.Parameters.Add( "@ConfigId", SqlDbType.Int) ;
|
||||
cmd.Parameters["@ConfigId"].Value = parameters.ConfigurationId ;
|
||||
var dataAdapter = new SqlDataAdapter( cmd) ;
|
||||
// Lettura DB e riempimento DataSet
|
||||
dsOffsets.Clear() ;
|
||||
@@ -821,13 +823,15 @@ namespace ib.essetre.integration.egaltech
|
||||
DataSet dsTrave = new DataSet() ;
|
||||
|
||||
string sqlTrave = "SELECT [group], [key], [value] " +
|
||||
"FROM [ESSETRE].[dbo].[vw_MachineParam] " +
|
||||
"WHERE [group] = 'TRAVE' " ;
|
||||
"FROM [ESSETRE].[dbo].[vw_MachineParam] " +
|
||||
"WHERE [group] = 'TRAVE' AND configurationId = @ConfigId" ;
|
||||
|
||||
// Connessione al DB ed esecuzione query
|
||||
using ( SqlConnection cn = new SqlConnection(_SqlConnectionStr)) {
|
||||
cn.Open() ;
|
||||
using ( SqlCommand cmd = new SqlCommand( sqlTrave, cn)) {
|
||||
cmd.Parameters.Add( "@ConfigId", SqlDbType.Int) ;
|
||||
cmd.Parameters["@ConfigId"].Value = parameters.ConfigurationId ;
|
||||
var dataAdapter = new SqlDataAdapter( cmd) ;
|
||||
// Lettura DB e riempimento DataSet
|
||||
dsTrave.Clear() ;
|
||||
|
||||
Reference in New Issue
Block a user