static void ConsThreadPerFact_Full(List <string> LstCTR_alreadyIntegratedNode, List <string> listPerfact) { string msgErr = string.Empty; List <ReceptionDTO> lstReceptionDTO = new List <ReceptionDTO>(); string perFactFull = string.Empty; foreach (var item in listPerfact) { List <ReceptionDTO> lstCTR_fact = new ReceptionIndexPresenter().GetAllMvtReception(item, out msgErr); foreach (var recDTO in lstCTR_fact) { lstReceptionDTO.Add(recDTO); } perFactFull += item + " | "; } List <string> lstCTRBDD = new List <string>(); if (lstReceptionDTO.Count() > 0) { lstCTRBDD = lstReceptionDTO.Select(s => s.NumeroCompteur).ToList(); int cptBdd = LstCTR_alreadyIntegratedNode.Except(lstCTRBDD).Count(); Presenter.TotalInserted_toNode = lstReceptionDTO.Count() - cptBdd; //---------A revoir perFactFull = perFactFull.Remove(perFactFull.Length - 2); Presenter.PeriodeFacturation = perFactFull; } }
static void ConsThreadPerFact_One(IList <ReceptionDTO> LesDonneesDeFacturation, List <string> LstCTR_alreadyIntegratedNode) { string msgErr = string.Empty; string _PerFact = LesDonneesDeFacturation.FirstOrDefault().PeriodeFacturation; if (!string.IsNullOrEmpty(_PerFact)) { //---fer un contrôle ici pour dissoscier les compteur mis en ecart ?(style dejà intégré ?) // Presenter.TotalInserted_toNode = new DAL<mvt_releve_reception>().Find(p => p.perfact == _PerFact).Count(); List <ReceptionDTO> lstReceptionDTO = new ReceptionIndexPresenter().GetAllMvtReception(_PerFact, out msgErr); List <string> lstCTRBDD = new List <string>(); if (lstReceptionDTO.Count() > 0) { lstCTRBDD = lstReceptionDTO.Select(s => s.NumeroCompteur).ToList(); int cptBdd = LstCTR_alreadyIntegratedNode.Except(lstCTRBDD).Count(); Presenter.TotalInserted_toNode = lstReceptionDTO.Count() - cptBdd; } Presenter.PeriodeFacturation = _PerFact; } else { Presenter.TotalInserted_toNode = 0; Presenter.PeriodeFacturation = string.Empty; } }