private void RechercheClient(CsReclamationRcl leClient) { try { Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient service1 = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil")); service1.RetourneReclamationCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } DonnesDatagrid.Clear(); foreach (var item in args.Result) { DonnesDatagrid.Add(item); } dtgrdClient.ItemsSource = DonnesDatagrid; }; service1.RetourneReclamationAsync(leClient.Fk_IdCentre.Value, leClient.CENTRE, leClient.Client, leClient.Ordre, leClient.NumeroReclamation); service1.CloseAsync(); } catch (Exception ex) { throw ex; } }
public CsDemandeReclamation RetourneLaDemande(int fk_demande) { //cmd.CommandText = "SPX_GUI_RETOURNE_DEMANDE"; CsDemandeReclamation _LaDemande = new CsDemandeReclamation(); try { galadbEntities transaction = new galadbEntities(); CsReclamationRcl _Reclamation = new CsReclamationRcl(); List <ADMUTILISATEUR> lstUser = transaction.ADMUTILISATEUR.ToList(); DEMANDE _DEMANDE = new DEMANDE(); _LaDemande.LaDemande = Entities.ConvertObject <CsDemandeBase, DEMANDE>(transaction.DEMANDE.FirstOrDefault(p => p.PK_ID == fk_demande)); try { DataTable dt = Galatee.Entity.Model.ReclamationProcedure.RetourneListeReclamationbyDemande(fk_demande); _Reclamation = Entities.GetEntityFromQuery <CsReclamationRcl>(dt); if (!string.IsNullOrEmpty(_Reclamation.AgentEmetteur)) { _Reclamation.NOMAGENTCREATION = lstUser.FirstOrDefault(t => t.MATRICULE == _Reclamation.AgentEmetteur) != null? lstUser.FirstOrDefault(t => t.MATRICULE == _Reclamation.AgentEmetteur).LIBELLE : string.Empty; } if (!string.IsNullOrEmpty(_Reclamation.AgentRecepteur)) { _Reclamation.NOMAGENTRECEPTEUR = lstUser.FirstOrDefault(t => t.MATRICULE == _Reclamation.AgentRecepteur) != null? lstUser.FirstOrDefault(t => t.MATRICULE == _Reclamation.AgentRecepteur).LIBELLE : string.Empty; } if (!string.IsNullOrEmpty(_Reclamation.AgentValidation)) { _Reclamation.NOMAGENTVALIDATEUR = lstUser.FirstOrDefault(t => t.MATRICULE == _Reclamation.AgentValidation) != null? lstUser.FirstOrDefault(t => t.MATRICULE == _Reclamation.AgentValidation).LIBELLE : string.Empty; } _LaDemande.ReclamationRcl = _Reclamation; DataTable dtDoc = DevisProcedures.DEVIS_DOCUMENTSCANNE_RETOURNEByIdDemande(_LaDemande.LaDemande.PK_ID); _LaDemande.DonneDeDemande = Entities.GetEntityListFromQuery <ObjDOCUMENTSCANNE>(dtDoc); } catch (Exception) { _LaDemande.ReclamationRcl = null; } transaction.Dispose(); return(_LaDemande); } catch (Exception ex) { throw ex; } }
//private void GetData() //{ // try // { // IFraudeServiceClient client = new IFraudeServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Fraude")); // client.SelectAllClientCompleted += (ssender, args) => // { // if (args.Cancelled || args.Error != null) // { // string error = args.Error.Message; // throw new Exception(error); // } // if (args.Result == null) // { // Message.ShowError(Galatee.Silverlight.Resources.Devis.Languages.msgErreurChargementDonnees, Galatee.Silverlight.Resources.Devis.Languages.lbl_Client); // return; // } // DonnesDatagrid.Clear(); // foreach (var item in args.Result) // { // DonnesDatagrid.Add(item); // LeClientRecherche.Add(item); // } // dtgrdClient.ItemsSource = DonnesDatagrid; // }; // client.SelectAllClientAsync(); // } // catch (Exception ex) // { // throw ex; // } //} private void btn_Rechercher_Click_1(object sender, RoutedEventArgs e) { if (this.Txt_CodeCentre.Tag != null && !string.IsNullOrEmpty(this.Txt_CodeCentre.Text) && !string.IsNullOrEmpty(this.Txt_NumDemande.Text)) { CsReclamationRcl leClient = new CsReclamationRcl(); leClient.Fk_IdCentre = (int)this.Txt_CodeCentre.Tag; leClient.CENTRE = this.Txt_CodeCentre.Text; // leClient.Client = this.Txt_Client.Text; leClient.NumeroReclamation = this.Txt_NumDemande.Text; // leClient.Ordre = this.Txt_Ordre.Text; RechercheClient(leClient); } }
private CsReclamationRcl GetInformationsFromScreen(CsReclamationRcl laReclamation) { var listObjetForInsertOrUpdate = new CsReclamationRcl(); try { laReclamation.ActionMenees = Txt_ActionMennes.Text; laReclamation.DateTransmission = Dtp_DateTraitement.SelectedDate.Value; laReclamation.AgentRecepteur = UserConnecte.matricule; return(laReclamation); } catch (Exception ex) { // Message.ShowError(ex.Message, Galatee.Silverlight.Resources.Devis.Languages.EtatDuCompteur); return(null); } }
private void AfficherInformationClient(CsReclamationRcl _LeClient) { DonnesDatagrid.Clear(); DonnesDatagrid.Add(_LeClient); dtgrdClient.ItemsSource = DonnesDatagrid; }