private void ChargerClientFromReferenceOrdre(string ReferenceClient, string Ordre)
 {
     try
     {
         Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient service = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Accueil"));
         service.RetourneClientByReferenceOrdreCompleted += (s, args) =>
         {
             if ((args != null && args.Cancelled) || (args.Error != null))
             {
                 return;
             }
             if (args.Result != null && args.Result.Count > 1)
             {
                 List <object> _Listgen = ClasseMEthodeGenerique.RetourneListeObjet(args.Result);
                 Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_Listgen, "CENTRE", "LIBELLESITE", "Liste des site");
                 ctr.Show();
                 ctr.Closed += new EventHandler(galatee_OkClickedChoixClient);
             }
             else
             {
                 ChargeDetailDEvis(args.Result.First());
             }
         };
         service.RetourneClientByReferenceOrdreAsync(ReferenceClient, Ordre, lstIdCentre);
         service.CloseAsync();
     }
     catch (Exception)
     {
         throw;
     }
 }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     if (lsDatas != null && lsDatas.Count != 0)
     {
         List <object> _LstObj = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(lsDatas.Keys.ToList());
         Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstObj, "GROUPENAME", "DESCRIPTION", "Liste des groupes");
         ctr.Closed += new EventHandler(galatee_OkClickedbtn_Group);
         ctr.Show();
     }
 }
 private void btn_Produit_Click(object sender, RoutedEventArgs e)
 {
     if (lProduitSelect != null && lProduitSelect.Count > 0)
     {
         this.btn_Produit.IsEnabled = false;
         List <object> _Listgen = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(lProduitSelect);
         Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_Listgen, "CODE", "LIBELLE", "Liste");
         ctr.Closed += new EventHandler(galatee_OkClickedProduit);
         ctr.Show();
     }
 }
        private void BtnCasEcrasable_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                ParametrageClient client = new ParametrageClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Parametrage"));
                client.GetCasindEcrasableByCasCompleted += (ssender, args) =>
                {
                    try
                    {
                        if (args.Cancelled || args.Error != null)
                        {
                            string error = args.Error.Message;
                            Message.ShowError(error, Languages.Parametrage);
                            return;
                        }
                        if (args.Result == null)
                        {
                            Message.ShowError(Languages.msgErreurChargementDonnees, Languages.Parametrage);
                            return;
                        }
                        if (args.Result != null)
                        {
                            //List<Galatee.Silverlight.ServiceCaisse.CParametre> ListeParam = new List<ServiceCaisse.CParametre>();
                            //foreach (var item in args.Result)
                            //{
                            //    Galatee.Silverlight.ServiceCaisse.CParametre parametre = new ServiceCaisse.CParametre();
                            //    parametre.VALEUR = item.PK_CAS;
                            //    parametre.LIBELLE = item.LIBELLE;
                            //    ListeParam.Add(parametre);
                            //}
                            List <object> _LstCasDeReleve = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(args.Result);
                            Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstCasDeReleve, "PK_CAS", "LIBELLE", Languages.CasDeReleve);
                            ctr.Closed += new EventHandler(form_Closed);
                            ctr.Show();

                            //ListeParam.OrderBy(p => p.VALEUR);
                            //Shared.UcListe form = new Shared.UcListe(ListeParam, true);
                            //form.Closed += form_Closed;
                            //form.Title = "Liste des cas écrasables";
                            //form.Show();
                        }
                    }
                    catch (Exception ex)
                    {
                        Message.ShowError(ex.Message, Languages.Parametrage);
                    }
                };
                client.GetCasindEcrasableByCasAsync();
            }
            catch (Exception ex)
            {
                Message.ShowError(ex.Message, Languages.Parametrage);
            }
        }
 private void btn_Site_Click_1(object sender, RoutedEventArgs e)
 {
     if (lstSite.Count > 0)
     {
         this.btn_Site.IsEnabled = false;
         List<object> _Listgen = ClasseMEthodeGenerique.RetourneListeObjet(lstSite);
         Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_Listgen, "CODE", "LIBELLE", "Liste");
         ctr.Closed += new EventHandler(galatee_OkClickedSite);
         ctr.Show();
     }
 }
 private void btn_Centre_Click(object sender, RoutedEventArgs e)
 {
     if (LstCentre.Count > 0)
     {
         this.btn_Centre.IsEnabled = false;
         List<object> _Listgen = ClasseMEthodeGenerique.RetourneListeObjet(LstCentre.Where(t=>t.FK_IDCODESITE == (int)this.Txt_CodeSite.Tag ).ToList());
         Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_Listgen, "CODE", "LIBELLE", Galatee.Silverlight.Resources.Accueil.Langue.lbl_ListeCentre);
         ctr.Closed += new EventHandler(galatee_OkClickedCentre);
         ctr.Show();
     }
 }
 private void btn_frequence_Click(object sender, RoutedEventArgs e)
 {
     this.btn_frequence.IsEnabled = false;
     if (LstFrequence != null && LstFrequence.Count != 0)
     {
         List <object> _ListObj = ClasseMEthodeGenerique.RetourneListeObjet(LstFrequence);
         this.btn_frequence.IsEnabled = false;
         Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_ListObj, "CODE", "LIBELLE", "Liste");
         ctr.Closed += new EventHandler(galatee_OkClickedBtnFrequence);
         ctr.Show();
     }
 }
 private void btn_Gestionnaire_Click(object sender, RoutedEventArgs e)
 {
     if (LstUser != null && LstUser.Count() > 0)
     {
         List <object> _LstObj = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(LstUser);
         Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstObj, "MATRICULE", "LIBELLE", "");
         ctr.Closed += new EventHandler(galatee_OkClickedbtn_Gestionnaire);
         ctr.Show();
     }
     else
     {
         Message.ShowInformation("Aucun utilisareur trouvée", "Information");
     }
 }
 private void btn_Centre_Click(object sender, RoutedEventArgs e)
 {
     if (this.Txt_LibelleSite.Tag != null)
     {
         List <ServiceAccueil.CsCentre> lstCentreSite = LstCentrePerimetre.Where(t => t.FK_IDCODESITE == (int)this.Txt_LibelleSite.Tag).ToList();
         if (lstCentreSite.Count > 0)
         {
             this.btn_Centre.IsEnabled = false;
             List <object> _Listgen = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(lstCentreSite);
             Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_Listgen, "CODE", "LIBELLE", "Liste");
             ctr.Closed += new EventHandler(galatee_OkClickedClient);
             ctr.Show();
         }
     }
 }
 private void btn_Calibre_Click(object sender, RoutedEventArgs e)
 {
     if (SessionObject.LstCalibreCompteur != null && SessionObject.LstCalibreCompteur.Count > 0)
     {
         if (this.Txt_Produit.Tag == null)
         {
             Message.ShowInformation("Selectionnez le produit avant", "Reporting");
             return;
         }
         this.btn_Calibre.IsEnabled = false;
         List <object> _Listgen = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(SessionObject.LstCalibreCompteur.Where(t => t.FK_IDPRODUIT == (int)this.Txt_Produit.Tag).ToList());
         Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_Listgen, "CODE", "LIBELLE", "Liste");
         ctr.Closed += new EventHandler(galatee_OkClickedCalibre);
         ctr.Show();
     }
 }
Esempio n. 11
0
 private void btn_Centre_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (LstCentre.Count > 0)
         {
             this.btn_Centre.IsEnabled = false;
             List <object> _Listgen = Shared.ClasseMEthodeGenerique.RetourneListeObjet(LstCentre.Where(t => t.FK_IDCODESITE == (int)this.Txt_CodeSite.Tag).ToList());
             Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_Listgen, "CODE", "LIBELLE", "Centre");
             ctr.Closed += new EventHandler(galatee_OkClickedCentre);
             ctr.Show();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, "Paramétrage");
     }
 }
 private void btn_forfait_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (LstForfait.Count != 0)
         {
             this.btn_forfait.IsEnabled = false;
             List <object> _LstObjet = ClasseMEthodeGenerique.RetourneListeObjet(LstForfait.Where(t => t.PRODUIT == this.txtProduit.Text).ToList());
             Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstObjet, "CODE", "LIBELLE", "Liste");
             ctr.Closed += new EventHandler(galatee_OkClickedBtnForfait);
             ctr.Show();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Galatee.Silverlight.Resources.Accueil.Langue.lbl_Menu);
     }
 }
 private void btn_MoisIndex_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (LstMois.Count != 0)
         {
             this.btn_MoisIndex.IsEnabled = false;
             List <object> _LstOject = ClasseMEthodeGenerique.RetourneListeObjet(LstMois);
             Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstOject, "CODE", "LIBELLE", "Liste");
             ctr.Closed += new EventHandler(galatee_OkClickedBtnMoisIndex);
             ctr.Show();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, Galatee.Silverlight.Resources.Accueil.Langue.lbl_Menu);
     }
 }
 private void btn_Site_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (lstSite.Count > 0)
         {
             this.btn_Site.IsEnabled = false;
             List <object> _Listgen = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(lstSite);
             Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_Listgen, "CODE", "LIBELLE", "Liste");
             ctr.Closed += new EventHandler(galatee_OkClickedSite);
             ctr.Show();
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex.Message, "Report");
     }
 }
Esempio n. 15
0
        private void btn_SearchScelle_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (ListdesScelles.Count > 0)
                {
                    var ListeScelleValide = ListdesScelles.Where(s => s.Status_ID == SessionObject.Enumere.StatusScelleRemis);
                    if (!string.IsNullOrEmpty(txt_NumNouveauScelle_1.Text))
                    {
                        ListeScelleValide = ListeScelleValide.Where(c => c.Numero_Scelle != txt_NumNouveauScelle_1.Text).ToList();
                    }
                    if (!string.IsNullOrEmpty(txt_NumNouveauScelle_2.Text))
                    {
                        ListeScelleValide = ListeScelleValide.Where(c => c.Numero_Scelle != txt_NumNouveauScelle_2.Text).ToList();
                    }
                    if (!string.IsNullOrEmpty(txt_NumNouveauScelle_3.Text))
                    {
                        ListeScelleValide = ListeScelleValide.Where(c => c.Numero_Scelle != txt_NumNouveauScelle_2.Text).ToList();
                    }
                    if (!string.IsNullOrEmpty(txt_NumNouveauScelle_Cache.Text))
                    {
                        ListeScelleValide = ListeScelleValide.Where(c => c.Numero_Scelle != txt_NumNouveauScelle_Cache.Text).ToList();
                    }
                    if (ListeScelleValide != null && ListeScelleValide.Count() > 0)
                    {
                        List <object> _LstObj = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(ListeScelleValide.OrderBy(t => t.Numero_Scelle).ToList());
                        Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstObj, "Matricule_Receiver", "Numero_Scelle", "Nbre_Scelles");
                        ctr.Closed += new EventHandler(galatee_OkClickedbtn_SearchScelle_1);
                        ctr.Show();
                    }
                }

                else
                {
                    Message.ShowInformation("Plus de scellés disponible en stock veuillez vous approvisionner", "Information");
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 private void btn_Ajouter_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         //LstCaissier=   ChargerCaissier(_LstrefReglement.Where(p => p.ISDEMANDEANNULATION == true).ToList());
         List <object> _LstCaissiere = ClasseMEthodeGenerique.RetourneListeObjet(_listDesCaisseOuverte);
         //List<string> lstcolonne = new List<string>();
         Dictionary <string, string> lstcolonne = new Dictionary <string, string>();
         lstcolonne.Add("CENTRE", "CENTRE");
         lstcolonne.Add("NUMCAISSE", "CAISSE");
         lstcolonne.Add("NOMCAISSE", "NOM");
         Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstCaissiere, lstcolonne, false, "Liste des caissiers");
         ctr.Show();
         ctr.Closed += new EventHandler(galatee_OkClickedCaissiere);
     }
     catch (Exception ex)
     {
         Message.Show(ex.Message, Langue.LibelleModule);
     }
 }
 private void btn_AgtRecepteur_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (lstAllUser != null && lstAllUser.Count() > 0)
         {
             List <object> _LstObj = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(lstAllUser.Where(c => c.CENTRE == UserConnecte.Centre).ToList());
             Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstObj, "MATRICULE", "LIBELLE", "");
             ctr.Closed += new EventHandler(galatee_OkClickedbtn_AgtRecepteur);
             ctr.Show();
         }
         else
         {
             Message.ShowInformation("Aucun utilisareur trouvée", "Information");
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 private void btn_SearchAgt_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (lstAllUser != null && lstAllUser.Count() > 0)
         {
             List <object> _LstObj = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(lstAllUser.Where(c => c.CENTRE == UserConnecte.Centre).ToList());
             Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstObj, "MATRICULE", "LIBELLE", "");
             ctr.Closed += new EventHandler(galatee_OkClickedbtn_SearchScelleAg);
             ctr.Show();
         }
         else
         {
             Message.ShowInformation("Plus de scellés disponible en stock veuillez vous approvisionner", "Information");
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 19
0
 private void btn_AgtLivreur_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (_lstUserProfil != null && _lstUserProfil.Count() > 0)
         {
             List <object> _LstObj = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(_lstUserProfil.OrderBy(t => t.LIBELLE).ToList());
             Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstObj, "MATRICULE", "LIBELLE", "");
             ctr.Closed += new EventHandler(galatee_OkClickedbtn_AgtLivreur);
             ctr.Show();
         }
         else
         {
             Message.ShowInformation("Aucun utilisareur trouvée", "Information");
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        private void btn_Caissier_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (lstCaisseDate == null || lstCaisseDate.Count == 0)
                {
                    lstCaisseDate = _listDesCaisseOuverte.Where(t => t.DATE_DEBUT.Value.ToShortDateString() == this.dtpDate.Text).ToList();
                }

                List <object> _LstCaissiere            = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(lstCaisseDate);
                Dictionary <string, string> lstcolonne = new Dictionary <string, string>();
                lstcolonne.Add("CENTRE", "CENTRE");
                lstcolonne.Add("NUMCAISSE", "CAISSE");
                lstcolonne.Add("NOMCAISSE", "NOM");
                Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstCaissiere, lstcolonne, false, "Liste des caissiers");
                ctr.Show();
                ctr.Closed += new EventHandler(galatee_OkClickedCaissiere);
            }
            catch (Exception ex)
            {
                Message.Show(ex.Message, Langue.LibelleModule);
            }
        }