This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct Database{ | |
| let port=":5656" | |
| let server="https://localhost" | |
| func GetServerURL()->String{ | |
| return server+""+port | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const DbConfig = require('../Config/DatabaseConfig.js'); | |
| const sql = require('mssql'); | |
| async function RicercaCantiere(NomeCantiere) { | |
| var data=[]; | |
| var query="select * from( ( SELECT Cantiere.IdCantiere,Cantiere.IdCliente, FilialeCliente.Citta as Filiale, Cliente.RagioneSociale, Cantiere.NomeCantiere, Cantiere.DataCreazioneCantiere, 'Consuntivo' as Tipologia, IdUtenteCreazioneCantiere, StatoCantiere, StatoFatturazione FROM Cantiere inner join CantiereConsuntivo on CantiereConsuntivo.IdCantiereConsuntivo = Cantiere.IdCantiere inner join Cliente on Cliente.IdCliente = Cantiere.IdCliente inner join FilialeCliente on FilialeCliente.IdFilialeCliente = CantiereConsuntivo.IdFiliale) union ( SELECT Cantiere.IdCantiere,Cantiere.IdCliente, 'SEDE' as Filiale, Cliente.RagioneSociale, Cantiere.NomeCantiere, Cantiere.DataCreazioneCantiere, 'Consuntivo' as Tipologia, IdUtenteCreazioneCantiere, StatoCantiere, StatoFatturazione FROM Cantiere inner join CantiereConsuntivo on CantiereConsuntivo.IdCantiereConsuntivo = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function GenerazioneRapportino() { | |
| console.log("Model: sono dentor model"); | |
| process.chdir('./Model'); | |
| const result = await new Promise((resolve, reject) => { | |
| exec('ruby report.rb prova prova2 prova3', function(err, stdout, stderr) { | |
| if (stderr) { | |
| console.log("Errore generazione rapportino: ", err); | |
| reject(false); | |
| } else { | |
| console.log("File Generator Correttamente: ", stdout); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const DbConfig = require('../Config/DatabaseConfig.js'); | |
| const sql = require('mssql'); | |
| async function RicercaCantiere(NomeCantiere) { | |
| var data=[]; | |
| await sql.connect(DbConfig.config); | |
| const request = new sql.Request(); | |
| request.input('NomeCantiere', sql.VarChar, NomeCantiere); | |
| const recordset=await request.query("select * from( (/* Cantieri Consuntivo con Filiale */ SELECT Cantiere.IdCantiere,Cantiere.IdCliente, FilialeCliente.Citta as Filiale, Cliente.RagioneSociale, Cantiere.NomeCantiere, Cantiere.DataCreazioneCantiere, 'Consuntivo' as Tipologia, IdUtenteCreazioneCantiere, StatoCantiere, StatoFatturazione FROM Cantiere inner join CantiereConsuntivo on CantiereConsuntivo.IdCantiereConsuntivo = Cantiere.IdCantiere inner join Cliente on Cliente.IdCliente = Cantiere.IdCliente inner join FilialeCliente on FilialeCliente.IdFilialeCliente = CantiereConsuntivo.IdFiliale) union ( /*Cantieri Consuntivo senza Filiale*/ SELECT Cantiere.IdCantiere,Cantiere.IdCliente, 'SEDE' as Filiale, Cliente.RagioneSociale, Ca |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { IdCantiere: 324, | |
| IdCliente: 171, | |
| Filiale: 'SEDE', | |
| RagioneSociale: '--', | |
| NomeCantiere: '--', | |
| DataCreazioneCantiere: 2018-01-25T17:47:21.643Z, | |
| Tipologia: 'Consuntivo', | |
| StatoCantiere: 'Chiuso', | |
| StatoFatturazione: 0 }, | |
| { IdCantiere: 329, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const DbConfig = require('../Config/DatabaseConfig.js'); | |
| const sql = require('mssql'); | |
| async function RicercaCantiere(NomeCantiere) { | |
| var data=[]; | |
| await sql.connect(DbConfig.config); | |
| const request = new sql.Request(); | |
| request.input('NomeCantiere', sql.VarChar, NomeCantiere); | |
| await request.query("select * from( (/* Cantieri Consuntivo con Filiale */ SELECT Cantiere.IdCantiere,Cantiere.IdCliente, FilialeCliente.Citta as Filiale, Cliente.RagioneSociale, Cantiere.NomeCantiere, Cantiere.DataCreazioneCantiere, 'Consuntivo' as Tipologia, IdUtenteCreazioneCantiere, StatoCantiere, StatoFatturazione FROM Cantiere inner join CantiereConsuntivo on CantiereConsuntivo.IdCantiereConsuntivo = Cantiere.IdCantiere inner join Cliente on Cliente.IdCliente = Cantiere.IdCliente inner join FilialeCliente on FilialeCliente.IdFilialeCliente = CantiereConsuntivo.IdFiliale) union ( /*Cantieri Consuntivo senza Filiale*/ SELECT Cantiere.IdCantiere,Cantiere.IdCliente, 'SEDE' as Filiale, Cliente.RagioneSociale, Cantiere.NomeCantie |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (s.ShowDialog(this) == DialogResult.OK) | |
| { | |
| CodiceDistintaSelezionata = s.CodiceDistintaSELECT; | |
| IdDistintaSelezionata = s.IdDistintaSELECT; | |
| Quantita = s.Quantità; | |
| sc1 = s.sc1; | |
| sc2 = s.sc2; | |
| sc3 = s.sc3; | |
| UnitaMisuraSelezionata = s.UnitaMisuraSelect; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using App.Controller; | |
| using App.Model; | |
| using System; | |
| using System.Data; | |
| using System.Data.SqlClient; | |
| using System.Drawing; | |
| using System.Globalization; | |
| using System.IO; | |
| using System.Windows.Forms; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const DbConfig = require('../Config/DatabaseConfig.js'); | |
| const sql = require('mssql'); | |
| async function Login(Username,Password) { | |
| await sql.connect(DbConfig.config); | |
| const request = new sql.Request(); | |
| request.input('Username', sql.VarChar, Username); | |
| request.input('Password', sql.VarChar, Password); | |
| request.output('Totale', sql.Int); | |
| const recordset = await request.query('select count(*) as Totale from Utente where Username=@Username and Password=@Password'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public DataTable RicercaClienti(String RagioneSociale, String Indirizzo, String Citta, String Provincia) | |
| { | |
| DataTable dt = new DataTable(); | |
| SqlConnection conn = Database.apriconnessione(); | |
| try | |
| { | |
| String Query = "Select * from Cliente "; | |
| if (RagioneSociale.ToString() != "") | |
| { |