private void ChargerModeReglement() { try { if (SessionObject.LstDesModereg != null && SessionObject.LstDesModereg.Count != 0) { return; } Galatee.Silverlight.ServiceCaisse.CaisseServiceClient service = new Galatee.Silverlight.ServiceCaisse.CaisseServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Caisse")); service.RetourneModesReglementCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } SessionObject.LstDesModereg = args.Result; }; service.RetourneModesReglementAsync(); service.CloseAsync(); } catch (Exception ex) { throw ex; } }
private void RecuperationListBanque() { try { //int loaderHandler = LoadingManager.BeginLoading(Langue.Data_Loading); if (SessionObject.ListeBanques != null && SessionObject.ListeBanques.Count != 0) { List <Galatee.Silverlight.ServiceCaisse.CsBanque> lbanque = new List <Galatee.Silverlight.ServiceCaisse.CsBanque>(); lbanque.AddRange(SessionObject.ListeBanques); if (lbanque != null && lbanque.Count > 0) { this.Cbo_Bank.ItemsSource = lbanque; this.Cbo_Bank.DisplayMemberPath = "LIBELLE"; return; } } Galatee.Silverlight.ServiceCaisse.CaisseServiceClient srv = new Galatee.Silverlight.ServiceCaisse.CaisseServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Caisse")); srv.RetourneListeDesBanquesCompleted += (ss, ee) => { try { if (ee.Cancelled || ee.Error != null || ee.Result == null) { string error = ee.Error.InnerException.ToString(); return; } //Assignation de la variable de session contenant la liste des banques SessionObject.ListeBanques = ee.Result; if (SessionObject.ListeBanques != null || SessionObject.ListeBanques.Count != 0) { List <Galatee.Silverlight.ServiceCaisse.CsBanque> lbanque = new List <Galatee.Silverlight.ServiceCaisse.CsBanque>(); lbanque.AddRange(SessionObject.ListeBanques); if (lbanque != null && lbanque.Count > 0) { this.Cbo_Bank.ItemsSource = lbanque; this.Cbo_Bank.DisplayMemberPath = "LIBELLE"; return; } } } catch (Exception ex) { Message.ShowError(ex, Galatee.Silverlight.Resources.Caisse.Langue.errorTitle); } finally { //LoadingManager.EndLoading(loaderHandler); } }; srv.RetourneListeDesBanquesAsync(); } catch (Exception ex) { throw ex; } }
public void retourneCaisseDispo() { try { Galatee.Silverlight.ServiceCaisse.CaisseServiceClient service = new Galatee.Silverlight.ServiceCaisse.CaisseServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Caisse")); service.ChargerCaisseDisponibleCompleted += (s, args) => { if (args != null && args.Cancelled) { return; } listedesCaisse = args.Result; retourneCentre(); }; service.ChargerCaisseDisponibleAsync(); service.CloseAsync(); } catch (Exception) { throw; } }
private void OKButton_Click(object sender, RoutedEventArgs e) { try { if (this.IsEnregistre == true) { Lademande.LaDemande.STATUT = SessionObject.Enumere.DemandeStatusPasseeEncaisse; ValidationDemande(Lademande); } else { if (!string.IsNullOrWhiteSpace(Txt_Client2.Text) && !string.IsNullOrWhiteSpace(Txt_Client2.Text) && !string.IsNullOrWhiteSpace(Txt_Client2.Text)) { Galatee.Silverlight.ServiceCaisse.CaisseServiceClient serviceRecherche = new Galatee.Silverlight.ServiceCaisse.CaisseServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Caisse")); //Galatee.Silverlight.ServiceCaisse.CsClient Element2 = null; //serviceRecherche.TestClientExistCompleted += (s, args) => //{ // if (args != null && args.Cancelled) // return; // Element2 = args.Result; // if (Element2 != null) // { // CsLclient unClient = new CsLclient(); // unClient.CENTRE = Element2.CENTRE; // unClient.FK_IDCENTRE = Element2.FK_IDCENTRE; // unClient.FK_IDCLIENT = Element2.PK_ID; // unClient.CLIENT = Txt_Client2.Text; // unClient.ORDRE = Txt_Ordre2.Text; // List<CsDemandeDetailCout> LstDetailDemande = new List<CsDemandeDetailCout>(); // if (!string.IsNullOrWhiteSpace(txt_Solde.Text)) // { // List<CsLclient> LstResultat = new List<CsLclient>(); // CsLclient resultat = new CsLclient(); // CsDemande Lademande = new CsDemande(); // Lademande.LaDemande = new CsDemandeBase(); // Lademande.LstCoutDemande = new List<CsDemandeDetailCout>(); // Lademande.LeCentre = new CsCentre(); // Lademande.LeTypeDemande = new CsTdem(); // Lademande.LaDemande.NUMDEM = lblDemande.Text; // Lademande.LaDemande.CENTRE = unClient.CENTRE; // Lademande.LaDemande.CLIENT = unClient.CLIENT; // Lademande.LaDemande.ORDRE = unClient.ORDRE; // Lademande.LaDemande.MATRICULE = UserConnecte.matricule; // Lademande.LaDemande.TYPEDEMANDE = SessionObject.Enumere.RechercheDemandeSolde; // Lademande.LaDemande.ANNOTATION = txt_anot.Text; // Lademande.LaDemande.STATUT = SessionObject.Enumere.DemandeStatusEnAttente; // Lademande.LaDemande.PK_ID = unClient.FK_IDCLIENT; // Lademande.LaDemande.USERCREATION = UserConnecte.matricule; // Lademande.LaDemande.DATECREATION = DateTime.Now; // Lademande.LaDemande.FK_IDCENTRE = unClient.FK_IDCENTRE; // Lademande.LaDemande.PRODUIT = "03"; // CsDemandeDetailCout detail = new CsDemandeDetailCout(); // detail.CENTRE = Txt_CodeCentre.Text; // detail.CLIENT = Txt_Client.Text; // detail.COPER = SessionObject.Enumere.CoperTransfertSolde; // detail.DATECREATION = DateTime.Now; // detail.FK_IDCENTRE = ClientDepart.FK_IDCENTRE; // detail.MONTANTHT = ClientDepart.SOLDE; // detail.NUMDEM = Lademande.LaDemande.NUMDEM; // detail.ORDRE = ClientDepart.ORDRE; // detail.USERCREATION = UserConnecte.matricule; // detail.DATECREATION = DateTime.Now; // detail.NATURE = SessionObject.Enumere.NatureBIL; // detail.TAXE = "00"; // LstDetailDemande.Add(detail); // Lademande.LstCoutDemande.AddRange(LstDetailDemande); // ValidationDemande(Lademande); // } // else // Message.ShowInformation("Le solde est vide","Information"); // } // else // MessageBox.Show("le client 2 n'existe pas"); //}; //serviceRecherche.TestClientExistAsync(Txt_CodeCentre2.Text, Txt_Client2.Text, Txt_Ordre2.Text); //serviceRecherche.CloseAsync(); } else { MessageBox.Show("Veuillez remplir les champs des clients"); } } } catch (Exception ex) { throw ex; } }