private void GetDataLot() { try { Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient client = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil")); client.RetourneLotDeScelleAffectationCompleted += (ssender, args) => { if (args.Cancelled || args.Error != null) { string error = args.Error.Message; Message.ShowError(error, Languages.LibelleReceptionScelle); return; } if (args.Result == null) { Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Scelles); return; } DonnesDatagridLot.Clear(); if (args.Result != null) { foreach (var item in args.Result.Where(x => x.Status_lot_ID == 1)) { //if(item.DateReception==DateTime.Now) DonnesDatagridLot.Add(item); } } dgLotScelle.ItemsSource = DonnesDatagridLot.OrderBy(t => t.lot_ID).OrderBy(x => x.Numero_depart).ToList(); }; client.RetourneLotDeScelleAffectationAsync(UserConnecte.FK_IDCENTRE); } catch (Exception ex) { throw ex; } }