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
| byte[] photo_aray = new byte[0]; | |
| try | |
| { | |
| //inserimento immagine di una distinta | |
| MemoryStream ms; | |
| ms = new MemoryStream(); | |
| /*line of erro--> */ pictureBoxCheckImmagine.Image.Save(ms, ImageFormat.Jpeg); | |
| photo_aray = new byte[ms.Length]; | |
| ms.Position = 0; | |
| ms.Read(photo_aray, 0, photo_aray.Length); |
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
| byte[] photo_aray = new byte[0]; | |
| try | |
| { | |
| //inserimento immagine di una distinta | |
| MemoryStream ms; | |
| ms = new MemoryStream(); | |
| pictureBoxCheckImmagine.Image.Save(ms, ImageFormat.Jpeg); | |
| photo_aray = new byte[ms.Length]; | |
| ms.Position = 0; | |
| ms.Read(photo_aray, 0, photo_aray.Length); |
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
| int conta_righe = 0; | |
| SqlConnection conn = Database.apriconnessione(); | |
| try { | |
| String Query = "SELECt DocumentiCantiere.IdDocumento,''+Utente.nome+' '+Utente.Cognome as InseritoDA,convert(varchar, DataInserimento,103) as DataInserimento,DocumentiCantiere.DocumentoFile FROM DocumentiCantiere inner join Utente on Utente.IdUtente = DocumentiCantiere.IdUtenteInserimento where DocumentiCantiere.IdCantiere=@IdCantiere"; | |
| SqlCommand cmd = new SqlCommand(Query, conn); | |
| cmd.Parameters.AddWithValue("@IdCantiere", c.IdCantiere); | |
| SqlDataAdapter da = new SqlDataAdapter(cmd); | |
| DataTable dt = new DataTable(); |
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() != "") | |
| { |
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
| 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
| 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
| 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
| { 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); | |
| 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 |