Пример #1
0
        /*private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
         * {
         *  using (Service.Service1Client client = new Service.Service1Client())
         *  {
         *      ListeArticle = client.getListArticle();
         *  }
         *
         * }*/

        private void AddArticl_Click(object sender, RoutedEventArgs e)
        {
            using (Service.Service1Client client = new Service.Service1Client())
            {
                client.AdmAddProd(AdtxBnam.Text, AdtxBpri.Text, AdtxBqt.Text, AdtxBresum.Text, AdtxBResu.Text);
            }
        }
Пример #2
0
 private void Connexion_click(object sender, RoutedEventArgs e)
 {
     if (Nom.Text != string.Empty && Prenom.Text != string.Empty)
     {
         string token;
         string tokAd;
         using (Service.Service1Client client = new Service.Service1Client())
         {
             token = client.login(Nom.Text, Prenom.Text);
             tokAd = client.GetiDAdm();
         }
         if (token == tokAd)
         {
             WpFVItrine.PAdmin Pagead = new WpFVItrine.PAdmin(token);
             this.Close();
             Pagead.ShowDialog();
         }
         else
         {
             WpFVItrine.Window1 window = new WpFVItrine.Window1(token);
             this.Close();
             window.ShowDialog();
         }
     }
 }
Пример #3
0
 private void Payer_click(object sender, RoutedEventArgs e)
 {
     using (Service.Service1Client client = new Service.Service1Client())
     {
         client.payer(Token.Text);
     }
 }
Пример #4
0
 private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     using (Service.Service1Client client = new Service.Service1Client())
     {
         ListeArticle = client.getListArticle();
     }
 }
Пример #5
0
        public Window1(string id)
        {
            InitializeComponent();
            Token.Text = id;

            /*using (Service.Service1Client client = new Service.Service1Client())
             * {
             *  ListeArticle = client.getListArticle();
             * }
             * ListeProduits.ItemsSource = ListeArticle; ListBox */

            using (Service.Service1Client client = new Service.Service1Client())
            {
                ListeArticle = client.getListArticle();
            }
            for (int i = 0; i < ListeArticle.Length; i++)
            {
                Vitrin.Add(ListeArticle[i]);
            }
            ListeProduits.ItemsSource = Vitrin;

            timer.Interval = new TimeSpan(0, 0, 1);
            timer.Tick    += ReactOnTime;
            timer.Start();
        }
Пример #6
0
        private void SuppProd_Click(object sender, RoutedEventArgs e)
        {
            Button  button  = sender as Button;
            Article article = button.DataContext as Article;

            using (Service.Service1Client client = new Service.Service1Client())
            {
                client.SuppProdVit(article);
            }
        }
Пример #7
0
        private void AddToPanier_Click(object sender, RoutedEventArgs e)
        {
            Button  button  = sender as Button;
            Article article = button.DataContext as Article;

            using (Service.Service1Client client = new Service.Service1Client())
            {
                client.ElemAddInPani(article, Token.Text);
            }
        }
Пример #8
0
        private void MoinsQt_Click(object sender, RoutedEventArgs e)
        {
            Button  button  = sender as Button;
            Article article = button.DataContext as Article;

            using (Service.Service1Client client = new Service.Service1Client())
            {
                client.enlever(Token.Text, article);
            }
            //Refresh
        }
Пример #9
0
 void ReactOnTime(object sender, EventArgs e)
 {
     using (Service.Service1Client mainClient = new Service.Service1Client())
     {
         Listelem = mainClient.getPanier(Token.Text);
         ElPanier.Clear();
         for (int i = 0; i < Listelem.Length; i++)
         {
             ElPanier.Add(Listelem[i]);
         }
     }
 }
Пример #10
0
 void ReactOnTime(object sender, EventArgs e)
 {
     using (Service.Service1Client mainClient = new Service.Service1Client())
     {
         ListeArticle = mainClient.getListArticle();
         Vitrin.Clear();
         for (int i = 0; i < ListeArticle.Length; i++)
         {
             Vitrin.Add(ListeArticle[i]);
         }
     }
 }
Пример #11
0
        public Panier(string tok)
        {
            InitializeComponent();
            Token.Text = tok;

            using (Service.Service1Client client = new Service.Service1Client())
            {
                Listelem = client.getPanier(Token.Text);
            }
            for (int i = 0; i < Listelem.Length; i++)
            {
                ElPanier.Add(Listelem[i]);
            }
            Paniers.ItemsSource = ElPanier;

            timer.Interval = new TimeSpan(0, 0, 1);
            timer.Tick    += ReactOnTime;
            timer.Start();
        }