COmpletato avanzamento con tutte le stored & co
aggiunto db git-svn-id: https://keyhammer.ath.cx/svn/GMW/trunk@22 365432ac-a1b5-4ffd-bb28-6d3099d32164
This commit is contained in:
@@ -11,40 +11,70 @@ namespace GMW.Type
|
||||
public ArtInProd()
|
||||
{
|
||||
}
|
||||
public ArtInProd(DS_Applicazione.Impianti2ArticoliRow riga)
|
||||
public ArtInProd(DS_Applicazione.v_ArtInProdRow riga)
|
||||
{
|
||||
Cliente = riga.Cliente;
|
||||
Famiglia = riga.Famiglia;
|
||||
Particolare = riga.Particolare;
|
||||
CodImpianto = riga.CodImpianto;
|
||||
CodArticolo = riga.CodArticolo;
|
||||
InizioProd = riga.InizioProd;
|
||||
FineProd = riga.FineProd;
|
||||
CodStampo = riga.CodStampo;
|
||||
Figura = riga.Figura;
|
||||
FiguraIncisa = riga.FiguraIncisa;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Codice impianto
|
||||
/// Cliente
|
||||
/// </summary>
|
||||
public string CodImpianto { get; set; }
|
||||
public string Cliente { get; set; }
|
||||
/// <summary>
|
||||
/// Famiglia
|
||||
/// </summary>
|
||||
public string Famiglia { get; set; }
|
||||
/// <summary>
|
||||
/// Codice Articolo
|
||||
/// </summary>
|
||||
public string CodArticolo { get; set; }
|
||||
public string Particolare { get; set; }
|
||||
/// <summary>
|
||||
/// Codice impianto
|
||||
/// </summary>
|
||||
public string CodImpianto { get; set; }
|
||||
/// <summary>
|
||||
/// Inizio produzione
|
||||
/// </summary>
|
||||
public DateTime InizioProd { get; set; }
|
||||
public DateTime InizioProd { get; set; }
|
||||
/// <summary>
|
||||
/// Fine produzione
|
||||
/// </summary>
|
||||
public DateTime? FineProd { get; set; }
|
||||
public DateTime? FineProd { get; set; }
|
||||
/// <summary>
|
||||
/// Codice Stampo
|
||||
/// </summary>
|
||||
public string CodStampo { get; set; }
|
||||
/// <summary>
|
||||
/// Figura
|
||||
/// </summary>
|
||||
public string Figura { get; set; }
|
||||
/// <summary>
|
||||
/// Figura Incisa
|
||||
/// </summary>
|
||||
public string FiguraIncisa { get; set; }
|
||||
/// <summary>
|
||||
/// inizializza a partire da una riga impianti2articoli
|
||||
/// </summary>
|
||||
/// <param name="riga"></param>
|
||||
public void setFromTabRow(DS_Applicazione.Impianti2ArticoliRow riga)
|
||||
public void setFromTabRow(DS_Applicazione.v_ArtInProdRow riga)
|
||||
{
|
||||
Cliente = riga.Cliente;
|
||||
Famiglia = riga.Famiglia;
|
||||
Particolare = riga.Particolare;
|
||||
CodImpianto = riga.CodImpianto;
|
||||
CodArticolo = riga.CodArticolo;
|
||||
InizioProd = riga.InizioProd;
|
||||
FineProd = riga.FineProd;
|
||||
CodStampo = riga.CodStampo;
|
||||
Figura = riga.Figura;
|
||||
FiguraIncisa = riga.FiguraIncisa;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+20
-14
@@ -10,39 +10,45 @@ namespace GMW.Type
|
||||
{
|
||||
public Articolo()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Articolo(DS_Applicazione.AnagArticoliRow riga)
|
||||
{
|
||||
CodArticolo = riga.CodArticolo;
|
||||
Cliente = riga.Cliente;
|
||||
Famiglia = riga.Famiglia;
|
||||
Particolare = riga.Particolare;
|
||||
DescrArticolo = riga.DescrArticolo;
|
||||
Figura = riga.Figura;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cliente
|
||||
/// </summary>
|
||||
public string Cliente { get; set; }
|
||||
/// <summary>
|
||||
/// Famiglia
|
||||
/// </summary>
|
||||
public string Famiglia { get; set; }
|
||||
/// <summary>
|
||||
/// Codice Articolo
|
||||
/// </summary>
|
||||
public string CodArticolo { get; set; }
|
||||
|
||||
public string Particolare { get; set; }
|
||||
/// <summary>
|
||||
/// Descrizione Articolo
|
||||
/// </summary>
|
||||
public string DescrArticolo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Figura
|
||||
/// </summary>
|
||||
public string Figura { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// inizializza a partire da una riga impianto tipizzata
|
||||
/// </summary>
|
||||
/// <param name="riga"></param>
|
||||
public void setFromTabRow(DS_Applicazione.AnagArticoliRow riga)
|
||||
{
|
||||
CodArticolo = riga.CodArticolo;
|
||||
Cliente = riga.Cliente;
|
||||
Famiglia = riga.Famiglia;
|
||||
Particolare = riga.Particolare;
|
||||
DescrArticolo = riga.DescrArticolo;
|
||||
Figura = riga.Figura;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+66
-3
@@ -14,6 +14,24 @@ namespace GMW.Type
|
||||
public UDC()
|
||||
{
|
||||
}
|
||||
public UDC(DS_Applicazione.TabStatoOdpUdcRow riga)
|
||||
{
|
||||
CodCompany = riga.CodCompany;
|
||||
ODP = riga.ODP;
|
||||
UDC_code = riga.UDC;
|
||||
Tara = riga.Tara;
|
||||
IdxStato = riga.IdxStato;
|
||||
Qta = riga.Qta;
|
||||
CodImballo = riga.CodImballo;
|
||||
CodImpianto = riga.CodImpianto;
|
||||
Particolare = riga.Particolare;
|
||||
CodStato = riga.CodStato;
|
||||
CodStampo = riga.CodStampo;
|
||||
Figura = riga.Figura;
|
||||
FiguraIncisa = riga.FiguraIncisa;
|
||||
CreateDate = riga.CreateDate;
|
||||
ModDate = riga.ModDate;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Codice company
|
||||
@@ -30,7 +48,7 @@ namespace GMW.Type
|
||||
/// <summary>
|
||||
/// Tara dell'UDC
|
||||
/// </summary>
|
||||
public float Tara { get; set; }
|
||||
public double Tara { get; set; }
|
||||
/// <summary>
|
||||
/// stato associato all'UDC
|
||||
/// </summary>
|
||||
@@ -44,13 +62,58 @@ namespace GMW.Type
|
||||
/// </summary>
|
||||
public string CodImballo { get; set; }
|
||||
/// <summary>
|
||||
/// Codice impianto
|
||||
/// </summary>
|
||||
public string CodImpianto { get; set; }
|
||||
/// <summary>
|
||||
/// Codice Articolo
|
||||
/// </summary>
|
||||
public string Particolare { get; set; }
|
||||
/// <summary>
|
||||
/// Codice Stato pezzo (sabbiato, smaterozzato, ...)
|
||||
/// </summary>
|
||||
public string CodStato { get; set; }
|
||||
/// <summary>
|
||||
/// Codice Stampo
|
||||
/// </summary>
|
||||
public string CodStampo { get; set; }
|
||||
/// <summary>
|
||||
/// Figura
|
||||
/// </summary>
|
||||
public string Figura { get; set; }
|
||||
/// <summary>
|
||||
/// Figura Incisa
|
||||
/// </summary>
|
||||
public string FiguraIncisa { get; set; }
|
||||
/// <summary>
|
||||
/// Data di creazione dell'UDC
|
||||
/// </summary>
|
||||
public DateTime CreateDate { get; set; }
|
||||
/// <summary>
|
||||
/// Data ultima modifica UDC
|
||||
/// </summary>
|
||||
public DateTime ModDate { get; set; }
|
||||
|
||||
public DateTime ModDate { get; set; }
|
||||
/// <summary>
|
||||
/// inizializza a partire da una riga statoOdpUdc
|
||||
/// </summary>
|
||||
/// <param name="riga"></param>
|
||||
public void setFromTabRow(DS_Applicazione.TabStatoOdpUdcRow riga)
|
||||
{
|
||||
CodCompany = riga.CodCompany;
|
||||
ODP = riga.ODP;
|
||||
UDC_code= riga.UDC;
|
||||
Tara = riga.Tara;
|
||||
IdxStato = riga.IdxStato;
|
||||
Qta = riga.Qta;
|
||||
CodImballo = riga.CodImballo;
|
||||
CodImpianto = riga.CodImpianto;
|
||||
Particolare = riga.Particolare;
|
||||
CodStato = riga.CodStato;
|
||||
CodStampo = riga.CodStampo;
|
||||
Figura = riga.Figura;
|
||||
FiguraIncisa = riga.FiguraIncisa;
|
||||
CreateDate = riga.CreateDate;
|
||||
ModDate = riga.ModDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace GMW.Type
|
||||
|
||||
#region area articoli
|
||||
|
||||
|
||||
protected Articolo[] _elencoArticoli;
|
||||
|
||||
/// <summary>
|
||||
@@ -110,7 +111,7 @@ namespace GMW.Type
|
||||
{
|
||||
return _elencoArticoli;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -190,16 +191,16 @@ namespace GMW.Type
|
||||
/// legge una tab di tipo Impianti2Articoli e la converte ad un array di tipo ArtInProd[]
|
||||
/// </summary>
|
||||
/// <param name="tabArt2Imp"></param>
|
||||
public void caricaArtInProd(DS_Applicazione.Impianti2ArticoliDataTable tabArt2Imp)
|
||||
public void caricaArtInProd(DS_Applicazione.v_ArtInProdDataTable tabArtInProd)
|
||||
{
|
||||
// conto quanti elementi ha la tab x inizializzare l'array...
|
||||
int numRighe = tabArt2Imp.Rows.Count;
|
||||
int numRighe = tabArtInProd.Rows.Count;
|
||||
_elencoArtInProd = new ArtInProd[numRighe];
|
||||
// prendo un obj impianto da valorizzare di volta in volta...
|
||||
ArtInProd obj;
|
||||
for (int i = 0; i < numRighe; i++)
|
||||
{
|
||||
obj = new ArtInProd(tabArt2Imp[i]);
|
||||
obj = new ArtInProd(tabArtInProd[i]);
|
||||
_elencoArtInProd[i] = obj;
|
||||
}
|
||||
}
|
||||
|
||||
+135
-104
@@ -110,33 +110,114 @@ namespace GMW.WS
|
||||
[WebMethod(Description = "Elenco impianti ed articoli attualmente in produzione (per codice anagrafico)")]
|
||||
public GMW.Type.ArtInProd[] ElencoArtInProd()
|
||||
{
|
||||
gestEl.caricaArtInProd(DataProxy.obj.taImp2Art.getCurrProd());
|
||||
return gestEl.elencoArtInProd;
|
||||
}
|
||||
/// <summary>
|
||||
/// fornisce l'elenco di impianti ed articoli attualmente in produzione (per codice anagrafico)
|
||||
/// </summary>
|
||||
/// <param name="CodImpianto">CodImpianto come da anagrafica</param>
|
||||
/// <returns></returns>
|
||||
[WebMethod(Description = "Elenco impianti ed articoli attualmente in produzione (per codice anagrafico)")]
|
||||
public GMW.Type.ArtInProd[] ElencoArtInProd4Impianto(string CodImpianto)
|
||||
{
|
||||
gestEl.caricaArtInProd(DataProxy.obj.taImp2Art.getCurrByImpianto(CodImpianto));
|
||||
gestEl.caricaArtInProd(DataProxy.obj.taArtInProd.GetData());
|
||||
return gestEl.elencoArtInProd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region area gestione stati & UDC
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Richiede la tara per l'UDC indicato
|
||||
/// </summary>
|
||||
/// <param name="UDC">codice dell'UDC</param>
|
||||
/// <returns>restituisce la tara salvata in precedenza</returns>
|
||||
[WebMethod(Description = "Richiede la tara per l'UDC indicato")]
|
||||
public double UdcInfo_GetTara(string UDC)
|
||||
{
|
||||
double answ = 0;
|
||||
try
|
||||
{
|
||||
answ = DataProxy.obj.taStatoOdpUdc.stp_getStatoByUdc(UDC)[0].Tara;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Restituisce l'elenco degli UDC parent di quello specificato
|
||||
/// </summary>
|
||||
/// <param name="UDC">codice dell'UDC</param>
|
||||
/// <returns></returns>
|
||||
[WebMethod(Description = "Restituisce l'elenco degli UDC parent di quello specificato")]
|
||||
public string[] UdcInfo_GetParentUdcList(string UDC_rich)
|
||||
{
|
||||
int numRec = 1; //calcolare!
|
||||
string[] answ = new string[numRec];
|
||||
// caricare dati!
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Restituisce l'elenco degli UDC child di quello specificato
|
||||
/// </summary>
|
||||
/// <param name="UDC">codice dell'UDC</param>
|
||||
/// <returns></returns>
|
||||
[WebMethod(Description = "Restituisce l'elenco degli UDC child di quello specificato")]
|
||||
public string[] UdcInfo_GetChildUdcList(string UDC_rich)
|
||||
{
|
||||
int numRec = 1; //calcolare!
|
||||
string[] answ = new string[numRec];
|
||||
// caricare dati!!!
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Restituisce tutti i dati dell'UDC indicato
|
||||
/// </summary>
|
||||
/// <param name="UDC">codice dell'UDC</param>
|
||||
/// <returns></returns>
|
||||
[WebMethod(Description = "Restituisce tutti i dati dell'UDC indicato")]
|
||||
public GMW.Type.UDC UdcInfo_GetFullData(string UDC_rich)
|
||||
{
|
||||
GMW.Type.UDC answ = new GMW.Type.UDC();
|
||||
// caricare dati!!!
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Controlla che il codice imballo inviato sia valido (pre creazione TARA)
|
||||
/// </summary>
|
||||
/// <param name="CodImballo"></param>
|
||||
/// <returns></returns>
|
||||
[WebMethod(Description = "Controlla che il codice imballo inviato sia valido (pre creazione TARA)")]
|
||||
public bool UdcInfo_CheckCodImballo(string CodImballo)
|
||||
{
|
||||
bool answ = false;
|
||||
// cerco se ci sia il codice imballo indicato
|
||||
try
|
||||
{
|
||||
answ = DataProxy.obj.taAnagImballi.stp_getImballoByCod(CodImballo).Rows.Count > 0;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Fornisce l'elenco degli articoli attualmente in produzione per impianto, data e turno
|
||||
/// </summary>
|
||||
/// <param name="CodImpianto">Codice impianto (da anagrafica)</param>
|
||||
/// <param name="dataRic">data di riferimento</param>
|
||||
/// <param name="turnoRic">turno di riferimento (1-2-3)</param>
|
||||
/// <returns></returns>
|
||||
[WebMethod(Description = "Elenco impianti ed articoli attualmente in produzione (per codice anagrafico)")]
|
||||
public GMW.Type.ArtInProd[] UdcInfo_ArtInProd4ImpDataTurno(string CodImpianto, DateTime dataRic, int turnoRic)
|
||||
{
|
||||
// calcolo quante ore sono il turno di riferimento...
|
||||
int oreTurno = 7 + (turnoRic - 1) * 8;
|
||||
// calrolo la data di riferimento come data richeista + ore x turno richiesto
|
||||
DateTime dataRif = dataRic.Date.AddHours(oreTurno);
|
||||
gestEl.caricaArtInProd(DataProxy.obj.taArtInProd.stp_byImpData(CodImpianto, dataRif));
|
||||
return gestEl.elencoArtInProd;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fornisce un nuovo codice UDC tipo TARA a partire dalla richiesta e salva i dati
|
||||
/// </summary>
|
||||
/// <param name="CodBilancia">codice anagrafico della bilanca che effettua la richiesta (codice della pesa)</param>
|
||||
/// <param name="tara">peso in kg (0 se non noto) da associare all'UDC come tara del contenitore</param>
|
||||
/// <param name="codImballo">codice dell'imballo (tipo cassone) - string LIBERO (non facciamo controlli in input)</param>
|
||||
/// <param name="CodImballo">codice dell'imballo (tipo cassone) - string LIBERO (non facciamo controlli in input)</param>
|
||||
/// <param name="CodTipoDichiarazione">tipo di dichiarazione (vedere relativa anagrafica consentita, es U=uomo, M=macchina...)</param>
|
||||
/// <param name="CodOperatore">codice dell'operatore</param>
|
||||
/// <returns>UDC: codice univoco del contenitore</returns>
|
||||
@@ -169,123 +250,73 @@ namespace GMW.WS
|
||||
// output risultato
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Richiede la tara per l'UDC indicato
|
||||
/// </summary>
|
||||
/// <param name="UDC">codice dell'UDC</param>
|
||||
/// <returns>restituisce la tara salvata in precedenza</returns>
|
||||
[WebMethod(Description = "Richiede la tara per l'UDC indicato")]
|
||||
public double UdcInfo_GetTara(string UDC)
|
||||
{
|
||||
double answ = 0;
|
||||
try
|
||||
{
|
||||
answ = DataProxy.obj.taStatoOdpUdc.getByUdc(UDC)[0].Tara;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce l'elenco degli UDC parent di quello specificato
|
||||
/// </summary>
|
||||
/// <param name="UDC">codice dell'UDC</param>
|
||||
/// <returns></returns>
|
||||
[WebMethod(Description = "Restituisce l'elenco degli UDC parent di quello specificato")]
|
||||
public string[] UdcInfo_GetParentUdcList(string UDC_rich)
|
||||
{
|
||||
int numRec = 1; //calcolare!
|
||||
string[] answ = new string[numRec];
|
||||
// caricare dati!
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce l'elenco degli UDC child di quello specificato
|
||||
/// </summary>
|
||||
/// <param name="UDC">codice dell'UDC</param>
|
||||
/// <returns></returns>
|
||||
[WebMethod(Description = "Restituisce l'elenco degli UDC child di quello specificato")]
|
||||
public string[] UdcInfo_GetChildUdcList(string UDC_rich)
|
||||
{
|
||||
int numRec = 1; //calcolare!
|
||||
string[] answ = new string[numRec];
|
||||
// caricare dati!!!
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce tutti i dati dell'UDC indicato
|
||||
/// </summary>
|
||||
/// <param name="UDC">codice dell'UDC</param>
|
||||
/// <returns></returns>
|
||||
[WebMethod(Description = "Restituisce tutti i dati dell'UDC indicato")]
|
||||
public GMW.Type.UDC UdcInfo_GetFullData(string UDC_rich)
|
||||
{
|
||||
GMW.Type.UDC answ = new GMW.Type.UDC();
|
||||
// caricare dati!!!
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Crea un nuovo UDC (collegato ad un UDC parent della tara) specificando tutti i dati richiesti
|
||||
/// Fornisce un nuovo codice UDC tipo completo (con pezzi) a partire dalla richiesta e salva i dati
|
||||
/// </summary>
|
||||
/// <param name="CodBilancia">codice anagrafico della bilanca che effettua la richiesta (codice della pesa)</param>
|
||||
/// <param name="tara">peso in kg (0 se non noto) da associare all'UDC come tara del contenitore</param>
|
||||
/// <param name="CodImballo">codice dell'imballo (tipo cassone) - string LIBERO (non facciamo controlli in input)</param>
|
||||
/// <param name="CodTipoDichiarazione">tipo di dichiarazione (vedere relativa anagrafica consentita, es U=uomo, M=macchina...)</param>
|
||||
/// <param name="CodOperatore">codice dell'operatore</param>
|
||||
/// <param name="UDC_Parent">codice dell'UDC parent (tara)</param>
|
||||
/// <param name="CodArticolo">codice dell'articolo + figura</param>
|
||||
/// <param name="Particolare">codice del particolare</param>
|
||||
/// <param name="qta">numero pezzi associati all'UDC</param>
|
||||
/// <returns>restituisce true/false a seconda che sia riuscito a salvare o meno i dati</returns>
|
||||
[WebMethod(Description = "Salva i dati aggiornati per l'UDC in quanto a numero pezzi associati")]
|
||||
public bool UdcCall_GetNew_Pesa(string CodBilancia, string UDC_Parent, string CodArticolo, int qta)
|
||||
/// <param name="PesoTot">Peso totale rilevato</param>
|
||||
/// <param name="PesoCad">Peso unitario rilevato</param>
|
||||
/// <param name="CodImpianto"></param>
|
||||
/// <param name="DataRif"></param>
|
||||
/// <param name="TurnoRif"></param>
|
||||
/// <param name="CodStato">Codice dello stato del pezzo (da anagrafica: sabbiato, ...)</param>
|
||||
/// <param name="CodStampo">Codice dello stampo</param>
|
||||
/// <param name="Figura"></param>
|
||||
/// <param name="FiguraIncisa"></param>
|
||||
/// <returns>UDC del nuovo cartellino</returns>
|
||||
[WebMethod(Description = "Fornisce un nuovo codice UDC tipo completo (con pezzi) a partire dalla richiesta e salva i dati")]
|
||||
public string UdcCall_GetNew_Pesa(string CodBilancia, double Tara, string CodImballo, string CodTipoDichiarazione, string CodOperatore, string UDC_Parent, string Particolare, int qta, float PesoTot, float PesoCad, string CodImpianto, DateTime DataRif, int TurnoRif, string CodStato, string CodStampo, string Figura, string FiguraIncisa)
|
||||
{
|
||||
// init
|
||||
bool answ = false;
|
||||
// ricavo cod company...
|
||||
string CodCompany = "ND";
|
||||
string CodSito = "ND";
|
||||
string answ = "NA";
|
||||
try
|
||||
{
|
||||
CodCompany = DataProxy.obj.taAnagBil.getByCod(CodBilancia)[0].CodCompany;
|
||||
CodSito = DataProxy.obj.taAnagBil.getByCod(CodBilancia)[0].CodSito;
|
||||
}
|
||||
catch
|
||||
{
|
||||
CodCompany = DataProxy.obj.taAnagBil.GetData()[0].CodCompany;
|
||||
CodSito = DataProxy.obj.taAnagBil.GetData()[0].CodSito;
|
||||
}
|
||||
int IdxStato = 20; // hard coded: è la postazione POST fusione di ambivere!!!
|
||||
// faccio update!
|
||||
DS_Applicazione.TabStatoOdpUdcDataTable tabUdc = DataProxy.obj.taStatoOdpUdc.updateByBilancia(CodCompany, UDC_Parent, CodArticolo, qta);
|
||||
// leggo la riga con la qta
|
||||
DS_Applicazione.TabStatoOdpUdcDataTable tabUdc = DataProxy.obj.taStatoOdpUdc.stp_insNewOdpUdcFull(CodCompany, CodSito, CodBilancia, string.Format("{0:yy}", DateTime.Now), "ND", Tara, IdxStato, CodImballo, CodTipoDichiarazione, CodOperatore, "UDC_PESA", qta, PesoTot, PesoCad, Particolare, CodStato, CodStampo, Figura, FiguraIncisa); // ATTENZIONE: "UDC_PESA" è "hard coded" nel db... !!!
|
||||
// leggo la riga
|
||||
try
|
||||
{
|
||||
decimal qtaIns = tabUdc[0].Qta;
|
||||
if (qtaIns == qta)
|
||||
{
|
||||
// allora ha aggiornato!
|
||||
answ = true;
|
||||
}
|
||||
answ = tabUdc[0].UDC;
|
||||
// salvo associazioen parent-child tra UDC!
|
||||
DataProxy.obj.taRelazUDC.Insert(UDC_Parent, answ);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Annulla un dato UDC (se permesso)
|
||||
/// </summary>
|
||||
/// <param name="UDC_req">codice dell'UDC parent (tara)</param>
|
||||
/// <returns>restituisce true/false a seconda che sia riuscito ad annullare l'UDC</returns>
|
||||
[WebMethod(Description = "Annulla un dato UDC (se permesso)")]
|
||||
public bool UdcCall_annullaUDC(string UDC_req)
|
||||
{
|
||||
// init
|
||||
bool answ = false;
|
||||
// !!!FARE!!! scrivere annullam ento UDC
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Controlla che il codice imballo inviato sia valido (pre creazione TARA)
|
||||
/// </summary>
|
||||
/// <param name="CodImballo"></param>
|
||||
/// <returns></returns>
|
||||
[WebMethod(Description = "Controlla che il codice imballo inviato sia valido (pre creazione TARA)")]
|
||||
public bool UdcCall_CheckCodImballo(string CodImballo)
|
||||
{
|
||||
bool answ = false;
|
||||
// cerco se ci sia il codice imballo indicato
|
||||
try
|
||||
{
|
||||
answ = DataProxy.obj.taAnagImballi.stp_getImballoByCod(CodImballo).Rows.Count > 0;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Generated
+7673
-3007
File diff suppressed because it is too large
Load Diff
+971
-388
File diff suppressed because it is too large
Load Diff
@@ -4,47 +4,25 @@
|
||||
Changes to this file may cause incorrect behavior and will be lost if
|
||||
the code is regenerated.
|
||||
</autogenerated>-->
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="43" ViewPortY="-47" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<DiagramLayout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ex:showrelationlabel="False" ViewPortX="116" ViewPortY="89" xmlns:ex="urn:schemas-microsoft-com:xml-msdatasource-layout-extended" xmlns="urn:schemas-microsoft-com:xml-msdatasource-layout">
|
||||
<Shapes>
|
||||
<Shape ID="DesignTable:Impianti2Articoli" ZOrder="6" X="471" Y="77" Height="191" Width="243" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:AnagArticoli" ZOrder="21" X="160" Y="86" Height="134" Width="217" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:AnagImpianti" ZOrder="18" X="830" Y="90" Height="172" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:AnagCompany" ZOrder="14" X="591" Y="335" Height="115" Width="230" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagSiti" ZOrder="17" X="884" Y="337" Height="134" Width="194" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:AnagBilance" ZOrder="7" X="1109" Y="329" Height="191" Width="234" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:AnagOdp" ZOrder="12" X="147" Y="278" Height="248" Width="199" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:AnagStati" ZOrder="10" X="823" Y="533" Height="115" Width="201" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:TabStatoOdpUdc" ZOrder="1" X="434" Y="506" Height="305" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:AnagTipoDichiaraz" ZOrder="5" X="1018" Y="718" Height="115" Width="254" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagStatiProdotto" ZOrder="4" X="99" Y="722" Height="115" Width="254" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagImballi" ZOrder="3" X="118" Y="575" Height="134" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagImpianti" ZOrder="27" X="830" Y="90" Height="172" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:AnagCompany" ZOrder="23" X="591" Y="335" Height="115" Width="230" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagSiti" ZOrder="26" X="884" Y="337" Height="134" Width="194" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="83" />
|
||||
<Shape ID="DesignTable:AnagBilance" ZOrder="18" X="1169" Y="336" Height="191" Width="234" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:AnagOdp" ZOrder="21" X="147" Y="278" Height="248" Width="199" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:AnagStati" ZOrder="19" X="867" Y="533" Height="115" Width="201" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagTipoDichiaraz" ZOrder="2" X="1110" Y="696" Height="115" Width="254" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagStatiProdotto" ZOrder="17" X="99" Y="722" Height="115" Width="254" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagImballi" ZOrder="16" X="118" Y="575" Height="134" Width="242" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="64" />
|
||||
<Shape ID="DesignTable:AnagArticoli" ZOrder="15" X="168" Y="43" Height="153" Width="217" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="102" />
|
||||
<Shape ID="DesignTable:Impianti2Articoli" ZOrder="14" X="489" Y="35" Height="248" Width="271" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="159" />
|
||||
<Shape ID="DesignTable:v_ArtInProd" ZOrder="11" X="1155" Y="0" Height="267" Width="271" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="197" />
|
||||
<Shape ID="DesignTable:TabStatoOdpUdc" ZOrder="1" X="467" Y="529" Height="362" Width="300" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
<Shape ID="DesignTable:StoricoEventi" ZOrder="5" X="855" Y="777" Height="305" Width="221" AdapterExpanded="true" DataTableExpanded="true" OldAdapterHeight="0" OldDataTableHeight="0" SplitterPosition="254" />
|
||||
</Shapes>
|
||||
<Connectors>
|
||||
<Connector ID="DesignRelation:FK_Impianti2Articoli_AnagArticoli" ZOrder="20" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>377</X>
|
||||
<Y>122</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>471</X>
|
||||
<Y>122</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_Impianti2Articoli_AnagImpianti" ZOrder="19" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>830</X>
|
||||
<Y>136</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>714</X>
|
||||
<Y>136</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_AnagImpianti_AnagSiti" ZOrder="16" LineWidth="11">
|
||||
<Connector ID="DesignRelation:FK_AnagImpianti_AnagSiti" ZOrder="25" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>963</X>
|
||||
@@ -56,7 +34,7 @@
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_AnagSiti_AnagCompany" ZOrder="15" LineWidth="11">
|
||||
<Connector ID="DesignRelation:FK_AnagSiti_AnagCompany" ZOrder="24" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>821</X>
|
||||
@@ -68,19 +46,19 @@
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_AnagBilance_AnagSiti" ZOrder="13" LineWidth="11">
|
||||
<Connector ID="DesignRelation:FK_AnagBilance_AnagSiti" ZOrder="22" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1078</X>
|
||||
<Y>404</Y>
|
||||
<Y>411</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1109</X>
|
||||
<Y>404</Y>
|
||||
<X>1169</X>
|
||||
<Y>411</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_AnagOdp_AnagCompany" ZOrder="11" LineWidth="11">
|
||||
<Connector ID="DesignRelation:FK_AnagOdp_AnagCompany" ZOrder="20" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>591</X>
|
||||
@@ -92,39 +70,127 @@
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_TabStatoOdpUdc_AnagOdp" ZOrder="9" LineWidth="11">
|
||||
<Connector ID="DesignRelation:FK_Impianti2Articoli_AnagArticoli1" ZOrder="13" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>346</X>
|
||||
<Y>516</Y>
|
||||
<X>385</X>
|
||||
<Y>80</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>434</X>
|
||||
<Y>516</Y>
|
||||
<X>489</X>
|
||||
<Y>80</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_TabStatoOdpUdc_AnagStati" ZOrder="8" LineWidth="11">
|
||||
<Connector ID="DesignRelation:FK_Impianti2Articoli_AnagImpianti" ZOrder="12" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>823</X>
|
||||
<Y>590</Y>
|
||||
<X>830</X>
|
||||
<Y>133</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>734</X>
|
||||
<Y>590</Y>
|
||||
<X>760</X>
|
||||
<Y>133</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_TabStatoOdpUdc_AnagImballi" ZOrder="2" LineWidth="11">
|
||||
<Connector ID="DesignRelation:FK_TabStatoOdpUdc_AnagArticoli" ZOrder="10" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>368</X>
|
||||
<Y>196</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>368</X>
|
||||
<Y>546</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>467</X>
|
||||
<Y>546</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_TabStatoOdpUdc_AnagImballi" ZOrder="9" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>360</X>
|
||||
<Y>620</Y>
|
||||
<Y>588</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>434</X>
|
||||
<Y>620</Y>
|
||||
<X>467</X>
|
||||
<Y>588</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_TabStatoOdpUdc_AnagOdp" ZOrder="8" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>329</X>
|
||||
<Y>526</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>329</X>
|
||||
<Y>554</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>467</X>
|
||||
<Y>554</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_TabStatoOdpUdc_AnagStati" ZOrder="7" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>867</X>
|
||||
<Y>574</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>767</X>
|
||||
<Y>574</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_TabStatoOdpUdc_AnagStatiProdotto" ZOrder="6" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>321</X>
|
||||
<Y>722</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>321</X>
|
||||
<Y>602</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>467</X>
|
||||
<Y>602</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_StoricoEventi_AnagTipoDichiaraz" ZOrder="4" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>1185</X>
|
||||
<Y>811</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1185</X>
|
||||
<Y>850</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>1076</X>
|
||||
<Y>850</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
<Connector ID="DesignRelation:FK_StoricoEventi_TabStatoOdpUdc" ZOrder="3" LineWidth="11">
|
||||
<RoutePoints>
|
||||
<Point>
|
||||
<X>767</X>
|
||||
<Y>797</Y>
|
||||
</Point>
|
||||
<Point>
|
||||
<X>855</X>
|
||||
<Y>797</Y>
|
||||
</Point>
|
||||
</RoutePoints>
|
||||
</Connector>
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace GMW_data
|
||||
public DS_ApplicazioneTableAdapters.AnagTipoDichiarazTableAdapter taTipoDich;
|
||||
public DS_ApplicazioneTableAdapters.AnagStatiProdottoTableAdapter taStatiProd;
|
||||
public DS_ApplicazioneTableAdapters.AnagImballiTableAdapter taAnagImballi;
|
||||
public DS_ApplicazioneTableAdapters.v_ArtInProdTableAdapter taArtInProd;
|
||||
public DS_ApplicazioneTableAdapters.RelazUDCTableAdapter taRelazUDC;
|
||||
|
||||
/// <summary>
|
||||
/// init dei table adapters
|
||||
@@ -35,6 +37,8 @@ namespace GMW_data
|
||||
taStatoOdpUdc = new GMW_data.DS_ApplicazioneTableAdapters.TabStatoOdpUdcTableAdapter();
|
||||
taStatiProd = new GMW_data.DS_ApplicazioneTableAdapters.AnagStatiProdottoTableAdapter();
|
||||
taAnagImballi = new GMW_data.DS_ApplicazioneTableAdapters.AnagImballiTableAdapter();
|
||||
taArtInProd = new GMW_data.DS_ApplicazioneTableAdapters.v_ArtInProdTableAdapter();
|
||||
taRelazUDC = new GMW_data.DS_ApplicazioneTableAdapters.RelazUDCTableAdapter();
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua setup dei connection strings da web.config delal singola applicazione
|
||||
@@ -50,6 +54,8 @@ namespace GMW_data
|
||||
taTipoDich.Connection.ConnectionString = memLayer.ML.confReadString("GMWConnectionString");
|
||||
taStatiProd.Connection.ConnectionString = memLayer.ML.confReadString("GMWConnectionString");
|
||||
taAnagImballi.Connection.ConnectionString = memLayer.ML.confReadString("GMWConnectionString");
|
||||
taArtInProd.Connection.ConnectionString = memLayer.ML.confReadString("GMWConnectionString");
|
||||
taRelazUDC.Connection.ConnectionString = memLayer.ML.confReadString("GMWConnectionString");
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -53,7 +53,7 @@ public class reportExporter
|
||||
// tab = (DataTable)GMW_data.DataProxy.obj.taStatoOdpUdc.getByUdc(UDC);
|
||||
// break;
|
||||
case reportRichiesto.CartellinoTara:
|
||||
tab = (DataTable)GMW_data.DataProxy.obj.taStatoOdpUdc.getByUdc(UDC);
|
||||
tab = (DataTable)GMW_data.DataProxy.obj.taStatoOdpUdc.stp_getStatoByUdc(UDC);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -109,7 +109,7 @@ public class reportPrinter
|
||||
// tab = (DataTable)GMW_data.DataProxy.obj.taStatoOdpUdc.getByUdc(UDC);
|
||||
// break;
|
||||
case reportRichiesto.CartellinoTara:
|
||||
tab = (DataTable)GMW_data.DataProxy.obj.taStatoOdpUdc.getByUdc(UDC);
|
||||
tab = (DataTable)GMW_data.DataProxy.obj.taStatoOdpUdc.stp_getStatoByUdc(UDC);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user