private void ChargeDonneDemande(int pk_id) { Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient service = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil")); service.RetourDemandeReclamationCompleted += (s, args) => { try { if (args != null && args.Cancelled) { return; } LaDemande = args.Result; if (LaDemande != null) { Txt_Nom.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.NomClient) ? string.Empty : LaDemande.ReclamationRcl.NomClient; Txt_Portable.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.NumeroTelephonePortable) ? string.Empty : LaDemande.ReclamationRcl.NumeroTelephonePortable; Txt_DateOuverture.Text = LaDemande.ReclamationRcl.DateOuverture == null ? string.Empty : LaDemande.ReclamationRcl.DateOuverture.Value.ToShortDateString(); Txt_NumeroFixe.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.NumeroTelephoneFixe) ? string.Empty : LaDemande.ReclamationRcl.NumeroTelephoneFixe; Txt_TypeReclamation.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.LIBELLETYPERECLAMATION) ? string.Empty : LaDemande.ReclamationRcl.LIBELLETYPERECLAMATION; Txt_Adress.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.Adresse) ? string.Empty : LaDemande.ReclamationRcl.Adresse; Txt_Email.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.Email) ? string.Empty : LaDemande.ReclamationRcl.Email; Txt_Object.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.ObjetReclamation) ? string.Empty : LaDemande.ReclamationRcl.ObjetReclamation; Txt_Observation.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.Observation) ? string.Empty : LaDemande.ReclamationRcl.Observation; Txt_Client.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.Client) ? string.Empty : LaDemande.ReclamationRcl.Client; Txt_DateRendezVous.Text = LaDemande.ReclamationRcl.DateRdv == null ? string.Empty : LaDemande.ReclamationRcl.DateRdv.Value.ToShortDateString(); Txt_DateRetourSouhaiter.Text = LaDemande.ReclamationRcl.DateRetourSouhaite == null ? string.Empty : LaDemande.ReclamationRcl.DateRetourSouhaite.Value.ToShortDateString(); Dtp_DateTraitement.SelectedDate = System.DateTime.Today; Txt_NumDemande.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.NumeroReclamation) ? string.Empty : LaDemande.ReclamationRcl.NumeroReclamation; Txt_EtablirPar.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.NOMAGENTCREATION) ? string.Empty : LaDemande.ReclamationRcl.NOMAGENTCREATION + " (" + LaDemande.ReclamationRcl.AgentEmetteur + ")"; Txt_AgentTraiteur.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.NOMAGENTRECEPTEUR) ? string.Empty : LaDemande.ReclamationRcl.NOMAGENTRECEPTEUR + " (" + LaDemande.ReclamationRcl.AgentRecepteur + ")"; Txt_ActionMennes.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.ActionMenees) ? string.Empty : LaDemande.ReclamationRcl.ActionMenees; Dtp_DateTraitement.SelectedDate = LaDemande.ReclamationRcl.DateTransmission == null ? null : LaDemande.ReclamationRcl.DateTransmission; Date_Retour.SelectedDate = DateTime.Now; this.tbControleClient.SelectedItem = this.tabItemValidation; #region DocumentScanne if (LaDemande.DonneDeDemande != null && LaDemande.DonneDeDemande.Count != 0) { //isPreuveSelectionnee = true; LstPiece.Clear(); foreach (var item in LaDemande.DonneDeDemande) { LstPiece.Add(item); } dgListePiece.ItemsSource = this.LstPiece; } //else //{ // isPreuveSelectionnee = false; //} #endregion if (this.IsConsultation == true) { //Cbo_Apreciation.SelectedValue =Cbo_Apreciation.ItemsSource!=null?((List<CsRclValidation>)Cbo_Apreciation.ItemsSource).FirstOrDefault(c=>c.PK_ID LaDemande.ReclamationRcl.Fk_IdValidation; Cbo_Apreciation.SelectedValue = LaDemande.ReclamationRcl.Fk_IdValidation; Date_Retour.SelectedDate = LaDemande.ReclamationRcl.DateRetour; check_NonConforme.IsChecked = LaDemande.ReclamationRcl.NonConformite; txt_lettrereponse.Text = LaDemande.ReclamationRcl.LettreReponse; OKButton.Visibility = Visibility.Collapsed; CancelButton.Visibility = Visibility.Collapsed; } //txtCentre.Text = _listeDesCentreExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.Fk_IdCentre)!= null ? // _listeDesCentreExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.Fk_IdCentre).LIBELLE :string.Empty ; //txt_Commune.Text = _listeDesCommuneExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDCOMMUNE) != null ? // _listeDesCommuneExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDCOMMUNE).LIBELLE : string.Empty ; //txt_Quartier.Text = _listeDesQuartierExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDQUARTIER) != null ? // _listeDesQuartierExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDQUARTIER).LIBELLE : string.Empty; //txt_NumSecteur.Text = SessionObject.LstSecteur.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDSECTEUR) != null ? // SessionObject.LstSecteur.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDSECTEUR).LIBELLE : string.Empty; //txt_NumRue.Text =SessionObject.LstRues.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDRUE)!= null ? // SessionObject.LstRues.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDRUE).LIBELLE : string.Empty ; } } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }; service.RetourDemandeReclamationAsync(pk_id); }
private void ChargeDonneDemande(int pk_id) { Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient service = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil")); service.RetourDemandeReclamationCompleted += (s, args) => { try { if (args != null && args.Cancelled) { return; } LaDemande = args.Result; if (LaDemande != null) { Txt_Nom.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.NomClient) ? string.Empty : LaDemande.ReclamationRcl.NomClient; Txt_Portable.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.NumeroTelephonePortable) ? string.Empty : LaDemande.ReclamationRcl.NumeroTelephonePortable; Txt_DateOuverture.Text = LaDemande.ReclamationRcl.DateOuverture == null ? string.Empty : LaDemande.ReclamationRcl.DateOuverture.Value.ToShortDateString(); Txt_NumeroFixe.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.NumeroTelephoneFixe) ? string.Empty : LaDemande.ReclamationRcl.NumeroTelephoneFixe; Txt_TypeReclamation.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.LIBELLETYPERECLAMATION) ? string.Empty : LaDemande.ReclamationRcl.LIBELLETYPERECLAMATION; Txt_Adress.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.Adresse) ? string.Empty : LaDemande.ReclamationRcl.Adresse; Txt_Email.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.Email) ? string.Empty : LaDemande.ReclamationRcl.Email; Txt_Object.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.ObjetReclamation) ? string.Empty : LaDemande.ReclamationRcl.ObjetReclamation; Txt_Observation.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.Observation) ? string.Empty : LaDemande.ReclamationRcl.Observation; Txt_Client.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.Client) ? string.Empty : LaDemande.ReclamationRcl.Client; Txt_DateRendezVous.Text = LaDemande.ReclamationRcl.DateRdv == null ? string.Empty : LaDemande.ReclamationRcl.DateRdv.Value.ToShortDateString(); Txt_DateRetourSouhaiter.Text = LaDemande.ReclamationRcl.DateRetourSouhaite == null ? string.Empty : LaDemande.ReclamationRcl.DateRetourSouhaite.Value.ToShortDateString(); Dtp_DateTraitement.SelectedDate = System.DateTime.Today; Txt_NumDemande.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.NumeroReclamation) ? string.Empty : LaDemande.ReclamationRcl.NumeroReclamation; Txt_EtablirPar.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.NOMAGENTCREATION) ? string.Empty : LaDemande.ReclamationRcl.NOMAGENTCREATION + " (" + LaDemande.ReclamationRcl.AgentEmetteur + ")"; Txt_AgentTraiteur.Text = UserConnecte.nomUtilisateur + " (" + UserConnecte.matricule + ")"; this.tbControleClient.SelectedItem = this.tabItemtraitement; Txt_MotifRejet.Text = string.IsNullOrEmpty(LaDemande.ReclamationRcl.MotifRejet) ? string.Empty : LaDemande.ReclamationRcl.MotifRejet; if (!string.IsNullOrEmpty(LaDemande.ReclamationRcl.MotifRejet)) { this.labMotif.Visibility = System.Windows.Visibility.Visible; this.Txt_MotifRejet.Visibility = System.Windows.Visibility.Visible; } #region DocumentScanne if (LaDemande.DonneDeDemande != null && LaDemande.DonneDeDemande.Count != 0) { //isPreuveSelectionnee = true; foreach (var item in LaDemande.DonneDeDemande) { LstPiece.Add(item); } dgListePiece.ItemsSource = this.LstPiece; } //else //{ // isPreuveSelectionnee = false; //} #endregion //txtCentre.Text = _listeDesCentreExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.Fk_IdCentre)!= null ? // _listeDesCentreExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.Fk_IdCentre).LIBELLE :string.Empty ; //txt_Commune.Text = _listeDesCommuneExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDCOMMUNE) != null ? // _listeDesCommuneExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDCOMMUNE).LIBELLE : string.Empty ; //txt_Quartier.Text = _listeDesQuartierExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDQUARTIER) != null ? // _listeDesQuartierExistant.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDQUARTIER).LIBELLE : string.Empty; //txt_NumSecteur.Text = SessionObject.LstSecteur.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDSECTEUR) != null ? // SessionObject.LstSecteur.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDSECTEUR).LIBELLE : string.Empty; //txt_NumRue.Text =SessionObject.LstRues.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDRUE)!= null ? // SessionObject.LstRues.FirstOrDefault(t => t.PK_ID == LaDemande.ReclamationRcl.FK_IDRUE).LIBELLE : string.Empty ; } } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }; service.RetourDemandeReclamationAsync(pk_id); }