コード例 #1
0
 void galatee_OkClickedSite(object sender, EventArgs e)
 {
     try
     {
         Galatee.Silverlight.ServiceAccueil.CsSite     _LeSite = new Galatee.Silverlight.ServiceAccueil.CsSite();
         Galatee.Silverlight.MainView.UcListeGenerique ctrs    = sender as Galatee.Silverlight.MainView.UcListeGenerique;
         if (ctrs.MyObject != null)
         {
             _LeSite = (Galatee.Silverlight.ServiceAccueil.CsSite)ctrs.MyObject;
             this.Txt_LibelleSite.Text = _LeSite.LIBELLE;
             this.Txt_CodeSite.Text    = _LeSite.CODE;
             this.Txt_CodeSite.Tag     = _LeSite;
             _lesCentre = SessionObject.LstCentre.Where(t => t.FK_IDCODESITE == _LeSite.PK_ID).ToList();
             if (_lesCentre != null && _lesCentre.Count == 1)
             {
                 this.Txt_LibelleCentre.Text = _lesCentre.First().LIBELLE;
                 this.Txt_CodeCentre.Text    = _lesCentre.First().CODE;
                 this.Txt_CodeCentre.Tag     = _lesCentre.First();
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #2
0
 private void btnTournee_OkClicked(object sender, EventArgs e)
 {
     try
     {
         Galatee.Silverlight.MainView.UcListeGenerique generiq = sender as Galatee.Silverlight.MainView.UcListeGenerique;
         if (generiq.isOkClick)
         {
             if (generiq.MyObjectList != null && generiq.MyObjectList.Count != 0)
             {
                 foreach (CsLotri item in generiq.MyObjectList)
                 {
                     ListeTourneeSelect.Add(item);
                     ListeIdTournee.Add(item.FK_IDTOURNEE.Value);
                     this.cbo_tournee.ItemsSource       = null;
                     this.cbo_tournee.ItemsSource       = ListeTourneeSelect;
                     this.cbo_tournee.DisplayMemberPath = "TOURNEE";
                     this.cbo_tournee.SelectedIndex     = 0;
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
コード例 #3
0
        void galatee_OkClicked(object sender, EventArgs e)
        {
            Galatee.Silverlight.MainView.UcListeGenerique ctrs = sender as Galatee.Silverlight.MainView.UcListeGenerique;
            if (ctrs.isOkClick)
            {
                lstRegrSelect.Clear();
                foreach (var p in ctrs.MyObjectList)
                {
                    lstRegrSelect.Add((ServiceRecouvrement.CsRegCli)p);
                }

                this.Cbo_Regcli.ItemsSource       = null;
                this.Cbo_Regcli.DisplayMemberPath = "NOM";
                this.Cbo_Regcli.ItemsSource       = lstRegrSelect;
                if (lstRegrSelect.Count != 0)
                {
                    this.Cbo_Regcli.SelectedItem = lstRegrSelect.First();
                }

                this.Cbo_Regcli.Tag = lstRegrSelect;
            }
            else
            {
                this.Cbo_Regcli.IsEnabled = true;
            }
        }
コード例 #4
0
 private void zones_OkClicked(object sender, EventArgs e)
 {
     try
     {
         Galatee.Silverlight.MainView.UcListeGenerique generiq = sender as Galatee.Silverlight.MainView.UcListeGenerique;
         if (generiq.isOkClick)
         {
             List <Galatee.Silverlight.ServiceAccueil.CsTournee> zones        = new List <Galatee.Silverlight.ServiceAccueil.CsTournee>();
             List <Galatee.Silverlight.ServiceAccueil.CsTournee> ListeDesZone = new List <Galatee.Silverlight.ServiceAccueil.CsTournee>();
             if (generiq.IsMultiselect)
             {
                 if (generiq.MyObjectList.Count != 0)
                 {
                     foreach (var p in generiq.MyObjectList)
                     {
                         ListeDesZone.Add((Galatee.Silverlight.ServiceAccueil.CsTournee)p);
                     }
                     this.cbo_tournee.ItemsSource       = null;
                     this.cbo_tournee.ItemsSource       = ListeDesZone;
                     this.cbo_tournee.Tag               = ListeDesZone;
                     this.cbo_tournee.DisplayMemberPath = "CODE";
                     this.cbo_tournee.SelectedItem      = ListeDesZone[0];
                 }
             }
         }
     }
     catch (Exception ex)
     {
         Message.ShowError(ex, "Erreur");
     }
 }
コード例 #5
0
 private void ChargerClientFromReference(string ReferenceClient)
 {
     try
     {
         Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient service = new Galatee.Silverlight.ServiceAccueil.AcceuilServiceClient(Utility.Protocole(), Utility.EndPoint("Accueil"));
         service.RetourneClientByReferenceCompleted += (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
             {
                 CsClient leClient = args.Result.First();
                 leClient.TYPEDEMANDE = Tdem;
                 VerifieExisteDemande(leClient);
             }
         };
         service.RetourneClientByReferenceAsync(ReferenceClient, lstIdCentre);
         service.CloseAsync();
     }
     catch (Exception)
     {
         prgBar.Visibility = System.Windows.Visibility.Collapsed;
         Message.ShowError("Erreur au chargement des données", "Demande");
     }
 }
コード例 #6
0
 void galatee_OkClickedSite(object sender, EventArgs e)
 {
     Galatee.Silverlight.MainView.UcListeGenerique ctrs = sender as Galatee.Silverlight.MainView.UcListeGenerique;
     if (ctrs.isOkClick)
     {
         this.btn_Site.IsEnabled = true;
         Galatee.Silverlight.ServiceAccueil.CsSite leSite = (Galatee.Silverlight.ServiceAccueil.CsSite)ctrs.MyObject;
         this.Txt_CodeSite.Text    = leSite.CODE;
         this.Txt_CodeSite.Tag     = leSite.CODE;
         this.Txt_LibelleSite.Text = leSite.LIBELLE;
         List <ServiceAccueil.CsCentre> lsiteCentre = LstCentrePerimetre.Where(t => t.CODESITE == this.Txt_CodeSite.Tag.ToString()).ToList();
         if (lsiteCentre.Count == 1)
         {
             this.Txt_CodeCentre.Text    = lsiteCentre.First().CODE;
             this.Txt_LibelleCentre.Text = lsiteCentre.First().LIBELLE;
             this.Txt_CodeCentre.Tag     = lsiteCentre.First().PK_ID;
             RemplirCommuneParCentre(lsiteCentre.First());
         }
         else
         {
             this.Txt_LibelleCentre.Visibility = System.Windows.Visibility.Collapsed;
         }
     }
     else
     {
         this.btn_Site.IsEnabled = true;
     }
 }
コード例 #7
0
 private void galatee_OkClickedChoixClient(object sender, EventArgs e)
 {
     Galatee.Silverlight.MainView.UcListeGenerique ctrs = sender as Galatee.Silverlight.MainView.UcListeGenerique;
     if (ctrs.isOkClick)
     {
         CsClient _UnClient = (CsClient)ctrs.MyObject;
         _UnClient.TYPEDEMANDE = Tdem;
         VerifieExisteDemande(_UnClient);
     }
 }
コード例 #8
0
        private void Button_Click_3(object sender, RoutedEventArgs e)
        {
            List <object> _LstSite = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(_lesSite.Where(t => t.CODE != "000").ToList());
            Dictionary <string, string> lstcolonne = new Dictionary <string, string>();

            lstcolonne.Add("CODE", "SITE");
            lstcolonne.Add("LIBELLE", "LIBELLE");
            Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstSite, lstcolonne, false, "Liste des sites");
            ctr.Show();
            ctr.Closed += new EventHandler(galatee_OkClickedSite);
        }
コード例 #9
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            List <object> _LstCaissiere            = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(MethodeGenerics.RetourneDistincCaissier(_listDesCaisseOuverte));
            Dictionary <string, string> lstcolonne = new Dictionary <string, string>();

            lstcolonne.Add("NOMCAISSE", "NOM");
            lstcolonne.Add("MATRICULE", "MATRICULE");
            Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_LstCaissiere, lstcolonne, false, "Liste des caissiers");
            ctr.Show();
            ctr.Closed += new EventHandler(galatee_OkClickedCaissiere);
        }
コード例 #10
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            List <object> _Lstcentre = Galatee.Silverlight.Shared.ClasseMEthodeGenerique.RetourneListeObjet(_lesCentre);
            Dictionary <string, string> lstcolonne = new Dictionary <string, string>();

            lstcolonne.Add("CODE", "CENTRE");
            lstcolonne.Add("LIBELLE", "LIBELLE");
            Galatee.Silverlight.MainView.UcListeGenerique ctr = new Galatee.Silverlight.MainView.UcListeGenerique(_Lstcentre, lstcolonne, false, "Liste des centres");
            ctr.Show();
            ctr.Closed += new EventHandler(galatee_OkClickedCentre);
        }
コード例 #11
0
 void galatee_OkClickedCentre(object sender, EventArgs e)
 {
     Galatee.Silverlight.MainView.UcListeGenerique ctrs = sender as Galatee.Silverlight.MainView.UcListeGenerique;
     if (ctrs.isOkClick)
     {
         this.btn_Centre.IsEnabled = true;
         Galatee.Silverlight.ServiceAccueil.CsCentre leCentre = (Galatee.Silverlight.ServiceAccueil.CsCentre)ctrs.MyObject;
         this.Txt_CodeCentre.Text = leCentre.CODE;
         this.Txt_CodeCentre.Tag  = leCentre.PK_ID;
         RemplirCommuneParCentre(leCentre);
     }
     else
     {
         this.btn_Centre.IsEnabled = true;
     }
 }
コード例 #12
0
 void galatee_OkClickedCentre(object sender, EventArgs e)
 {
     try
     {
         Galatee.Silverlight.MainView.UcListeGenerique ctrs = sender as Galatee.Silverlight.MainView.UcListeGenerique;
         if (ctrs.MyObject != null)
         {
             Galatee.Silverlight.ServiceAccueil.CsCentre _LeCentre = (Galatee.Silverlight.ServiceAccueil.CsCentre)ctrs.MyObject;
             this.Txt_LibelleCentre.Text = _LeCentre.LIBELLE;
             this.Txt_CodeCentre.Text    = _LeCentre.CODE;
             this.Txt_CodeCentre.Tag     = _LeCentre;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #13
0
 void galatee_OkClickedCaissiere(object sender, EventArgs e)
 {
     try
     {
         CsHabilitationCaisse _LeCaisseSelect = new CsHabilitationCaisse();
         Galatee.Silverlight.MainView.UcListeGenerique ctrs = sender as Galatee.Silverlight.MainView.UcListeGenerique;
         if (ctrs.MyObject != null)
         {
             _LeCaisseSelect       = (CsHabilitationCaisse)ctrs.MyObject;
             this.TxtCaissier.Text = _LeCaisseSelect.NOMCAISSE;
             this.TxtCaissier.Tag  = _LeCaisseSelect;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #14
0
 void galatee_OkClickedSite(object sender, EventArgs e)
 {
     Galatee.Silverlight.MainView.UcListeGenerique ctrs = sender as Galatee.Silverlight.MainView.UcListeGenerique;
     if (ctrs.isOkClick)
     {
         this.btn_Site.IsEnabled = true;
         Galatee.Silverlight.ServiceAccueil.CsSite leSite = (Galatee.Silverlight.ServiceAccueil.CsSite)ctrs.MyObject;
         this.Txt_CodeSite.Text    = leSite.CODE;
         this.Txt_CodeSite.Tag     = leSite.PK_ID;
         this.Txt_LibelleSite.Text = leSite.LIBELLE;
         lsiteCentre = LstCentrePerimetre.Where(t => t.CODESITE == leSite.CODE).ToList();
         if (lsiteCentre.Count == 1)
         {
             this.Txt_CodeCentre.Text    = lsiteCentre.First().CODE;
             this.Txt_LibelleCentre.Text = lsiteCentre.First().LIBELLE;
             this.Txt_CodeCentre.Tag     = lsiteCentre.First().PK_ID;
         }
     }
     this.btn_Site.IsEnabled = true;
 }
コード例 #15
0
 void galatee_OkClickedCentre(object sender, EventArgs e)
 {
     try
     {
         List <Galatee.Silverlight.ServiceAccueil.CsCentre> _LeCentre = new List <Galatee.Silverlight.ServiceAccueil.CsCentre>();
         Galatee.Silverlight.MainView.UcListeGenerique      ctrs      = sender as Galatee.Silverlight.MainView.UcListeGenerique;
         if (ctrs.MyObject != null)
         {
             _LeCentre.Add((Galatee.Silverlight.ServiceAccueil.CsCentre)ctrs.MyObject);
             Cbo_Centre.ItemsSource       = null;
             Cbo_Centre.ItemsSource       = _LeCentre;
             Cbo_Centre.DisplayMemberPath = "LIBELLE";
             Cbo_Centre.SelectedItem      = _LeCentre[0];
             this.Cbo_Centre.Tag          = _LeCentre;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #16
0
 void galatee_OkClickedSite(object sender, EventArgs e)
 {
     try
     {
         List <Galatee.Silverlight.ServiceAccueil.CsSite> _LeSite = new List <Galatee.Silverlight.ServiceAccueil.CsSite>();
         Galatee.Silverlight.MainView.UcListeGenerique    ctrs    = sender as Galatee.Silverlight.MainView.UcListeGenerique;
         if (ctrs.MyObject != null)
         {
             _LeSite.Add((Galatee.Silverlight.ServiceAccueil.CsSite)ctrs.MyObject);
             Cbo_Site.ItemsSource       = null;
             Cbo_Site.ItemsSource       = _LeSite;
             Cbo_Site.DisplayMemberPath = "LIBELLE";
             Cbo_Site.SelectedItem      = _LeSite[0];
             this.Cbo_Site.Tag          = _LeSite;
             LstCentreDuSite            = _lesCentre.Where(t => t.FK_IDCODESITE == _LeSite[0].PK_ID).ToList();
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #17
0
 void galatee_OkClickedCentre(object sender, EventArgs e)
 {
     Galatee.Silverlight.MainView.UcListeGenerique ctrs = sender as Galatee.Silverlight.MainView.UcListeGenerique;
     if (ctrs.isOkClick)
     {
         this.btn_Centre.IsEnabled = true;
         Galatee.Silverlight.ServiceAccueil.CsCentre leCentre = (Galatee.Silverlight.ServiceAccueil.CsCentre)ctrs.MyObject;
         this.Txt_CodeCentre.Text    = leCentre.CODE;
         this.Txt_CodeCentre.Tag     = leCentre.PK_ID;
         this.Txt_LibelleCentre.Text = leCentre.LIBELLE;
         lProduitSelect = leCentre.LESPRODUITSDUSITE;
         if (lProduitSelect != null && lProduitSelect.Count != 0)
         {
             this.Txt_Produit.Text = lProduitSelect.First().LIBELLE;
             this.Txt_Produit.Tag  = lProduitSelect.First().CODE;
             this.btn_Produit.Tag  = lProduitSelect.First().PK_ID;
         }
     }
     else
     {
         this.btn_Centre.IsEnabled = true;
     }
 }