public void FillRW_ALE_GRUPPO(ALEDS ds, bool Aperto) { string select = @"SELECT * FROM RW_ALE_GRUPPO WHERE APERTO= $P{APERTO}"; ParamSet ps = new ParamSet(); ps.AddParam("APERTO", DbType.String, Aperto ? "1" : "0"); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.RW_ALE_GRUPPO); } }
public void FillRW_ALE_GRUPPO(ALEDS ds, decimal IDALEGRUPPO) { string select = @"SELECT * FROM RW_ALE_GRUPPO WHERE IDALEGRUPPO = $P{IDALEGRUPPO}"; ParamSet ps = new ParamSet(); ps.AddParam("IDALEGRUPPO", DbType.Decimal, IDALEGRUPPO); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.RW_ALE_GRUPPO); } }
public void FillUSR_PRD_MOVFASI(ALEDS ds, string IDCHECKQT) { string select = @"SELECT CQ.IDCHECKQT,MF.* FROM DITTA1.USR_PRD_MOVFASI MF INNER JOIN DITTA1.USR_PRD_FLUSSO_MOVFASI FMF ON FMF.IDPRDMOVFASE= MF.IDPRDMOVFASE INNER JOIN DITTA1.USR_CHECKQ_T CQ ON CQ.IDORIGINE_RIL = FMF.IDFLUSSOMOVFASE WHERE CQ.ORIGINE_RIL = 2 AND CQ.IDCHECKQT = $P{IDCHECKQT1} UNION ALL SELECT CQ.IDCHECKQT,MF.* FROM DITTA2.USR_PRD_MOVFASI MF INNER JOIN DITTA2.USR_PRD_FLUSSO_MOVFASI FMF ON FMF.IDPRDMOVFASE= MF.IDPRDMOVFASE INNER JOIN DITTA2.USR_CHECKQ_T CQ ON CQ.IDORIGINE_RIL = FMF.IDFLUSSOMOVFASE WHERE CQ.ORIGINE_RIL = 2 AND CQ.IDCHECKQT = $P{IDCHECKQT2} "; ParamSet ps = new ParamSet(); ps.AddParam("IDCHECKQT1", DbType.String, IDCHECKQT); ps.AddParam("IDCHECKQT2", DbType.String, IDCHECKQT); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_MOVFASI); } }
public void FillMAGAZZ(ALEDS ds, string IDMAGAZZ) { string select = @" SELECT * FROM GRUPPO.MAGAZZ WHERE IDMAGAZZ = $P{IDMAGAZZ}"; ParamSet ps = new ParamSet(); ps.AddParam("IDMAGAZZ", DbType.String, IDMAGAZZ); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.MAGAZZ); } }
public void FillCLIFO(ALEDS ds, string codice) { string select = @"SELECT * FROM GRUPPO.CLIFO WHERE CODICE = $P{CODICE}"; ParamSet ps = new ParamSet(); ps.AddParam("CODICE", DbType.String, codice); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.CLIFO); } }
public void GetUSR_PRD_TDIBATopFinish(EstraiProdottiFinitiDS ds, string IDTDIBA) { string select = string.Format(@"select MA.MODELLO,MET.DESDIBAMETHOD METODO,TB.* from ditta2.usr_prd_tdiba tb inner join gruppo.magazz ma on ma.idmagazz = tb.idmagazz inner join GRUPPO.USR_TAB_DIBAMETHODS MET ON MET.IDDIBAMETHOD = tb.IDDIBAMETHOD where tb.IDTDIBA = $P<IDTDIBA>"); ParamSet ps = new ParamSet(); ps.AddParam("IDTDIBA", DbType.String, IDTDIBA); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_TDIBATOPFINISH); } }
public void FillUSR_VENDITEPF_DIBATREE(PreventiviDS ds, string IDVENDITEPFDIBA) { string select = @"SELECT VF.* FROM DITTA1.USR_VENDITEPF_DIBATREE VF WHERE IDVENDITEPFDIBA = $P<IDVENDITEPFDIBA> "; ParamSet ps = new ParamSet(); ps.AddParam("IDVENDITEPFDIBA", DbType.String, IDVENDITEPFDIBA); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_VENDITEPF_DIBATREE); } }
public void GetUSR_PRD_RDIBATopFinish(EstraiProdottiFinitiDS ds, string IDTDIBA) { string select = string.Format(@"select TB.*,UN.CODICEUNIMI from ditta2.usr_prd_Rdiba tb INNER JOIN GRUPPO.TABUNIMI UN ON UN.IDTABUNIMI=TB.IDTABUNIMI where tb.IDTDIBA = $P<IDTDIBA>"); ParamSet ps = new ParamSet(); ps.AddParam("IDTDIBA", DbType.String, IDTDIBA); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_RDIBATOPFINISH); } }
public void FillUSR_VENDITEPF(PreventiviDS ds, string IDVENDITEPD) { string select = @"SELECT VF.* FROM DITTA1.USR_VENDITEPF VF WHERE IDVENDITEPD = $P<IDVENDITEPD> ORDER BY QTA"; ParamSet ps = new ParamSet(); ps.AddParam("IDVENDITEPD", DbType.String, IDVENDITEPD); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_VENDITEPF); } }
public void FillAP_PREVENTIVIG(PreventiviDS ds, string IDVENDITEPF) { string select = @"SELECT VF.* FROM AP_PREVENTIVIG VF WHERE IDVENDITEPF = $P<IDVENDITEPF> "; ParamSet ps = new ParamSet(); ps.AddParam("IDVENDITEPF", DbType.String, IDVENDITEPF); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.AP_PREVENTIVIG); } }
public void FillUSR_VENDITED(ValorizzazioneDS ds, string anno) { string select = @" SELECT vd.* FROM usr_vendited vd inner join usr_venditet vt on vt.idvenditet = vd.idvenditet where vt.annodoc = $P<ANNO> and vt.IDTABTIPDOC = '0000000022'"; ParamSet ps = new ParamSet(); ps.AddParam("ANNO", DbType.String, anno); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_VENDITED); } }
public void FillPIANIFICAZIONE_FASE(PianificazioneDS ds, string IDLANCIOD) { string select = @"SELECT FA.* FROM PIANIFICAZIONE_FASE FA INNER JOIN PIANIFICAZIONE_LANCIO LA ON LA.IDLANCIO = FA.IDLANCIO WHERE LA.IDLANCIOD = $P{IDLANCIOD}"; ParamSet ps = new ParamSet(); ps.AddParam("IDLANCIOD", DbType.String, IDLANCIOD); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.PIANIFICAZIONE_FASE); } }
public void FillUSR_PRD_FASI_FaseRipartenzaCommessaDaIDORIGINE_Tipo_1(PianificazioneDS ds, string IDPRDMOVMATE) { string select = @"select fa1.* FROM usr_prd_mate ma inner join usr_prd_fasi fa1 on fa1.idprdfase = ma.idprdfase where ma.idprdmate = $P{IDPRDMOVMATE} "; ParamSet ps = new ParamSet(); ps.AddParam("IDPRDMOVMATE", DbType.String, IDPRDMOVMATE); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_FASI); } }
public void FillUSR_PRD_FASI_Sorelle(PianificazioneDS ds, string IDPRDFASE) { string select = @"select FA.* FROM usr_prd_fasi fa inner join usr_prd_fasi ma on ma.idlanciod = fa.idlanciod where ma.IDPRDFASE = $P{IDPRDFASE} "; ParamSet ps = new ParamSet(); ps.AddParam("IDPRDFASE", DbType.String, IDPRDFASE); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_FASI); } }
public void FillUSR_TRASF_RICH(TrasferimentiDS ds, string barcode) { string select = @"SELECT ri.*,RT.NUMRICHTRASFT FROM USR_TRASF_RICH ri inner join USR_TRASF_RICHT RT ON RT.IDRICHTRASFT = RI.IDRICHTRASFT WHERE RI.BARCODE = $P{BARCODE}"; ParamSet ps = new ParamSet(); ps.AddParam("BARCODE", DbType.String, barcode); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_TRASF_RICH); } }
public void FillUSR_PRD_FLUSSO_MOVFASI(PrioritaDS ds, string IDPRDMOVFASE) { string select = @"select mv.*,cau.desprdcaufase as causale from usr_prd_flusso_movfasi mv inner join gruppo.usr_prd_caufasi cau on cau.idprdcaufase = mv.idprdcaufase where idprdmovfase = $P<IDPRDMOVFASE> order by idflussomovfase"; ParamSet ps = new ParamSet(); ps.AddParam("IDPRDMOVFASE", DbType.String, IDPRDMOVFASE); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_FLUSSO_MOVFASI); } }
public void FillUSR_PDM_FILES(PreserieDS ds, string IDMAGAZZ) { string select = @" select FI.*, IM.IDMAGAZZ from gruppo.USR_PDM_FILES FI INNER JOIN GRUPPO.USR_PDM_IMG_MAGAZZ IM ON IM.IDPDMFILE = FI.IDPDMFILE where IM.idmagazz = $P{IDMAGAZZ}"; ParamSet ps = new ParamSet(); ps.AddParam("IDMAGAZZ", DbType.String, IDMAGAZZ); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PDM_FILES); } }
public void FillUSR_PRD_MOVFASIByIDLANCIOD(PianificazioneDS ds, string IDLANCIOD) { string select = @"SELECT MF.* FROM USR_PRD_MOVFASI MF INNER JOIN USR_PRD_FASI FA ON MF.IDPRDFASE = FA.IDPRDFASE WHERE FA.IDLANCIOD = $P{IDLANCIOD}"; ParamSet ps = new ParamSet(); ps.AddParam("IDLANCIOD", DbType.String, IDLANCIOD); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_MOVFASI); } }
public void FillUSR_PRD_FASI_INFRAGRUPPO(PianificazioneDS ds, string IDPRDFASE_FROM) { string select = @"select * from usr_prd_fasi fa inner join siglapp.usr_infra_fase_to_fase infra on infra.idprdfase_to = fa.idprdfase where infra.idprdfase_from = $P{IDPRDFASE_FROM} "; ParamSet ps = new ParamSet(); ps.AddParam("IDPRDFASE_FROM", DbType.String, IDPRDFASE_FROM); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_FASI); } }
public void FillMAGAZZSQL(EtichetteDS ds, string IDMAGAZZ) { string select = @"SELECT * FROM CROSSREFERENCE where [Cross-Reference Type]=1 and [Cross-Reference Type No_]in('C00197','C00422','C00443','C00463','C00481') AND [Cross-Reference No_] like '$P<IDMAGAZZ>' "; ParamSet ps = new ParamSet(); ps.AddParam("IDMAGAZZ", DbType.String, IDMAGAZZ); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.MAGAZZ); } }
public void FillUSR_PRD_FASIDaIDPRDMATE(PianificazioneDS ds, string IDPRDMATE) { string select = @" select * FROM usr_prd_fasi fa inner join usr_prd_mate ma on ma.idprdfase = fa.idprdfase where ma.idprdmate = $P{IDPRDMATE} "; ParamSet ps = new ParamSet(); ps.AddParam("IDPRDMATE", DbType.String, IDPRDMATE); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_FASI); } }
public void FillUSR_VENDITEPD(PreventiviDS ds, string IDVENDITEPT) { string select = @"SELECT VD.*,MA.MODELLO, MA.DESMAGAZZ FROM DITTA1.USR_VENDITEPD VD INNER JOIN GRUPPO.MAGAZZ MA ON MA.IDMAGAZZ = VD.IDMAGAZZ WHERE IDVENDITEPT = $P<IDVENDITEPT> ORDER BY NRRIGA"; ParamSet ps = new ParamSet(); ps.AddParam("IDVENDITEPT", DbType.String, IDVENDITEPT); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_VENDITEPD); } }
public void GetUSR_PRD_MOVFASIDaLancio(AnalisiOrdiniVenditaDS ds, string idLancioD) { string select = @" SELECT * FROM USR_PRD_movFASI mf inner join USR_PRD_FASI fa on fa.idprdfase = mf.idprdfase WHERE fa.idlanciod = $P<IDLANCIOD> and mf.qtadater>0"; ParamSet ps = new ParamSet(); ps.AddParam("IDLANCIOD", DbType.String, idLancioD); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_MOVFASI); } }
public void FillCDC_GALVANICA(CDCDS ds, List <decimal> IDDETTAGLIO, string tipoCertificato) { string selezione = ConvertToStringForInCondition(IDDETTAGLIO); string select = @"SELECT * FROM CDC_GALVANICA WHERE IDDETTAGLIO IN ({0}) AND CERTIFICATO = $P<CERTIFICATO> "; string query = string.Format(select, selezione); ParamSet ps = new ParamSet(); ps.AddParam("CERTIFICATO", DbType.String, tipoCertificato); using (DbDataAdapter da = BuildDataAdapter(query, ps)) { da.Fill(ds.CDC_GALVANICA); } }
public void GetUSR_PRD_MOVFASIAperte(AnalisiOrdiniVenditaDS ds, string IdPrdFase) { string select = @" SELECT * FROM DITTA1.USR_PRD_movFASI mf inner join DITTA1.USR_PRD_FASI fa on fa.idprdfase = mf.idprdfase WHERE fa.idlanciod = (select idlanciod from DITTA1.USR_PRD_FASI where idprdfase = $P<IDPRDFASE> ) and mf.qtadater>0"; ParamSet ps = new ParamSet(); ps.AddParam("IDPRDFASE", DbType.String, IdPrdFase); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_MOVFASI); } }
public void GetANAGRAFICA(MigrazioneODLDS ds, String idmagazz) { string select = @"SELECT MA.MODELLO,BC.* from bc_anagrafica_produzione BC INNER JOIN GRUPPO.MAGAZZ MA ON MA.IDMAGAZZ = BC.IDMAGAZZ WHERE BC.IDMAGAZZ = $P<IDMAGAZZ>"; ParamSet ps = new ParamSet(); ps.AddParam("IDMAGAZZ", DbType.String, idmagazz); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.BC_ANAGRAFICA_PRODUZIONE); } }
public void InsertODL2ODPlog(string numMovFase, string nota, string esecuzione, string company) { if (nota.Length > 1000) { nota = nota.Substring(0, 1000); } string select = @"insert into ODL2ODPLOG (NUMMOVFASE,NOTA,ESECUZIONE,COMPANY,DATACREAZIONE) values ($P{NUMMOVFASE},$P{NOTA},$P{ESECUZIONE},$P{COMPANY},$P{DATACREAZIONE})"; ParamSet ps = new ParamSet(); ps.AddParam("NUMMOVFASE", DbType.String, numMovFase); ps.AddParam("NOTA", DbType.String, nota); ps.AddParam("ESECUZIONE", DbType.String, esecuzione); ps.AddParam("COMPANY", DbType.String, company); ps.AddParam("DATACREAZIONE", DbType.DateTime, DateTime.Now); using (DbCommand cmd = BuildCommand(select, ps)) { cmd.ExecuteNonQuery(); } }
public void FillCostiFissiPreventivo(ArticoloDS ds, decimal idPreventivoCosti, bool soloNonCancellati) { string select = @"SELECT * FROM COSTIFISSIPREVENTIVO WHERE IDPREVENTIVOCOSTO = $P<IDPREVENTIVOCOSTO> "; if (soloNonCancellati) { select += "AND CANCELLATO = 'N' "; } ParamSet ps = new ParamSet(); ps.AddParam("IDPREVENTIVOCOSTO", DbType.Decimal, idPreventivoCosti); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.COSTIFISSIPREVENTIVO); } }
public void FillFasiInfragruppo(AnalisiOrdiniVenditaDS ds, string idPrdFaseOrigine) { string select = @" select fa3.* from SIGLAPP.USR_INFRA_FASE_TO_FASE f2f inner join ditta2.usr_prd_fasi fa2 on fa2.idprdfase = f2f.IDPRDFASE_to inner join ditta2.usr_prd_fasi fa3 on fa2.idlanciod = fa3.idlanciod where f2f.IDPRDFASE_FROM = $P<IDPRDFASE>"; ParamSet ps = new ParamSet(); ps.AddParam("IDPRDFASE", DbType.String, idPrdFaseOrigine); using (DbDataAdapter da = BuildDataAdapter(select, ps)) { da.Fill(ds.USR_PRD_FASI); } }
public void FillDettaglioReparto(PreserieDS ds, DataTable dt, string barcode) { string query = @"SELECT VI.* FROM {0} VI INNER JOIN RW_PR_DETTAGLIO DT ON DT.IDDETTAGLIO = VI.IDDETTAGLIO WHERE DT.BARCODE = $P<BARCODE>"; query = string.Format(query, dt.TableName); ParamSet ps = new ParamSet(); ps.AddParam("BARCODE", DbType.String, barcode); using (DbDataAdapter da = BuildDataAdapter(query, ps)) { da.Fill(dt); } }