private void ValiderCetteCommande(CommandeConcernantRA_DATA obj) { //MessageBox.Show(obj.commande.id +""); ClasseGlobale._renduCommande = obj.commande; ClasseGlobale.Client = obj.commande.client; Label_CommandeSelectionner = ClasseGlobale._renduCommande.id.ToString(); //MessageBox.Show(); }
private void ExecuteResultatRechercheClient(CommandeConcernantRA_DATA obj) { ContentCommandeConcernant = new List <CommandeConcernantRA_DATA>(); if (obj.clt.type == 0) { List <Commande> listeCommande = (List <Commande>)CommandeDAO.selectCommandesByClient(obj.clt.id, false, true, true); if (listeCommande != null) { foreach (Commande com in listeCommande) { foreach (Article art in com.listArticles) { //Si l'un des articles n'est pas rendu, j'ajoute la commande à la liste if (art.ifRendu == false) { String etat = null; if (com.payee == true) { etat = "Commande payée"; } else { etat = "Commande non payée"; } ContentCommandeConcernant.Add(new CommandeConcernantRA_DATA() { Label_restitutionArticles_Reference = com.id, Label_restitutionArticles_DateCommande = com.date.ToString(), commande = com, Label_restitutionArticles_Etat = etat, Label_restitutionArticles_nomDuClient = com.client.nom + " " + com.client.prenom }); break; } } } } else { MessageBox.Show("Ce client n'a pas de commande"); } } }