private void RechercheDemande(int?idcentre, string numdem, List <string> LstTdem, string datedebut, string dateFin, string datedemande, string numerodebut, string numerofin, string status, string Commune, string Quatier, string Secteur, string Rue, string Porte, string Etage, string NumeroLot, string compteur, string nom) { try { List <CsDemandeBase> LstDemande = new List <CsDemandeBase>(); DateTime? pDateDebut = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.IsDateValider(datedebut); DateTime? pDateFin = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.IsDateValider(dateFin); DateTime? pDatedemande = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.IsDateValider(datedemande); if ((pDateDebut == null && !string.IsNullOrEmpty(datedebut)) || (pDateFin == null && !string.IsNullOrEmpty(dateFin)) || (pDatedemande == null && !string.IsNullOrEmpty(datedemande))) { Message.ShowError(Langue.MsgDateInvalide, Langue.lbl_Menu); } if (pDateDebut != null) { pDateDebut = pDateDebut; } if (pDateFin != null) { pDateFin = pDateFin.Value.AddDays(1); } AcceuilServiceClient service1 = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil")); service1.RetourneListeDemandeCritereCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } LstDemande = res.Result; if (LstDemande != null && LstDemande.Count != 0) { UcListInitialisation ctrl = new UcListInitialisation(LstDemande); ctrl.Show(); } else { Message.ShowInformation("Aucune demande trouvée", "Info"); } }; service1.RetourneListeDemandeCritereAsync(idcentre, numdem, LstTdem, pDateDebut, pDateFin, pDatedemande, numerodebut, numerofin, status, Commune, Quatier, Secteur, Rue, Porte, Etage, NumeroLot, compteur, nom); service1.CloseAsync(); } catch (Exception ex) { throw ex; } }
private void RechercheDemande(string centre, string numdem, List <string> LstTdem, string datedebut, string dateFin, string datedemande, string numerodebut, string numerofin, string status) { try { List <CsDemandeBase> LstDemande = new List <CsDemandeBase>(); DateTime? pDateDebut = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.IsDateValider(datedebut); DateTime? pDateFin = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.IsDateValider(dateFin); DateTime? pDatedemande = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.IsDateValider(datedemande); if ((pDateDebut == null && !string.IsNullOrEmpty(datedebut)) || (pDateFin == null && !string.IsNullOrEmpty(dateFin)) || (pDatedemande == null && !string.IsNullOrEmpty(datedemande))) { Message.ShowError(Langue.MsgDateInvalide, Langue.lbl_Menu); } AcceuilServiceClient service1 = new AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil")); service1.RetourneListeDemandeCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } LstDemande = res.Result; if (LstDemande != null && LstDemande.Count != 0) { this.DialogResult = true; UcListInitialisation ctrl = new UcListInitialisation(LstDemande); ctrl.Show(); } //else // Message.ShowError(Langue.MsgDemandeNonTrouve, Langue.lbl_Menu); }; service1.RetourneListeDemandeAsync(centre, numdem, LstTdem, pDateDebut, pDateFin, pDatedemande, numerodebut, numerofin, status); service1.CloseAsync(); } catch (Exception ex) { throw ex; } }
private void RechercheDemande(string numdem) { try { List <CsDemandeBase> LstDemande = new List <CsDemandeBase>(); AcceuilServiceClient service1 = new AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil")); service1.RetourneListeDemandeCompleted += (sr, res) => { if (res != null && res.Cancelled) { return; } LstDemande = res.Result; if (LstDemande != null && LstDemande.Count > 0) { if (LstDemande.Count > 1) { UcListInitialisation ctrl = new UcListInitialisation(LstDemande); ctrl.Show(); } else { Galatee.Silverlight.Devis.UcConsultationDevis ctrl = new Galatee.Silverlight.Devis.UcConsultationDevis(LstDemande.First().PK_ID); ctrl.Show(); } } else { Message.ShowInformation("Demande non trouvée", "Info"); return; } }; service1.RetourneListeDemandeAsync(null, numdem, new List <string>(), null, null, null, null, string.Empty, string.Empty); service1.CloseAsync(); } catch (Exception ex) { throw ex; } }