Example #1
0
 //Login button
 private void button_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         ServiceReference3.Service1Client      client = new ServiceReference3.Service1Client();
         ServiceReference3.SuperUzytkownikType dane   = client.Logowanie(textBox_Copy.Text, textBox_Copy1.Text);
         if (textBox_Copy.Text != "" && textBox_Copy1.Text != "")
         {
             if (dane.Status_super == true)
             {
                 MessageBox.Show($"Zalogwano uzytkownika z ID: {dane.Id_super} i jest administratorem, {dane.Status_super}");
             }
             else
             {
                 WyszukajZalogowany zalog = new WyszukajZalogowany();
                 zalog.IdUzytk = dane.Id_super;
                 zalog.Show();
                 Close();
             }
         }
         else
         {
             MessageBox.Show("PuStoDzwIn!");
         }
     }
     catch
     {
         MessageBox.Show("Глина");
     }
 }
Example #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ServiceReference3.Service1Client client = new ServiceReference3.Service1Client();
            string text = client.Top5Dan();

            dataGrid.ItemsSource = text;
        }
Example #3
0
 private void button_Click(object sender, RoutedEventArgs e)
 {
     if (Dodaj.IsEnabled == true)
     {
         ServiceReference3.Service1Client client = new ServiceReference3.Service1Client();
         client.DodajProdDoLodowki(IdUzyt, Int32.Parse(textBox.Text), Int32.Parse(ilosc.Text));
     }
     else if (Usun.IsEnabled == true)
     {
         ServiceReference3.Service1Client client = new ServiceReference3.Service1Client();
         client.UsunZlodowki(IdUzyt, Int32.Parse(textBox.Text), Int32.Parse(ilosc.Text));
     }
 }
 //Отправка данных на мыло
 private void button_Click(object sender, RoutedEventArgs e)
 {
     //Антибот
     if (textBox2.Text == textBox3.Text)
     {
         ServiceReference3.Service1Client client = new ServiceReference3.Service1Client();
         loso          = client.SprawdzMail(textBox_Copy3.Text);
         textBox4.Text = loso.ToString();
     }
     else
     {
         MessageBox.Show("JESTEŚ ROBOTEM. NIE PUSZCZĘ!!!");
     }
 }
 //Проверка кода который пришел на меил
 private void button_Copy_Click(object sender, RoutedEventArgs e)
 {
     if (textBox4.Text == textBox1.Text)
     {
         ServiceReference3.Service1Client client = new ServiceReference3.Service1Client();
         bool rej = client.Rejestracja(textBox.Text, textBox_Copy.Text, textBox_Copy1.Text, textBox_Copy2.Text, textBox_Copy3.Text);
         if (rej == true)
         {
             MessageBox.Show("Successful");
         }
         Close();
     }
     else
     {
         MessageBox.Show("Błędnie podany kod");
     }
 }
 private void Odswiez_Click(object sender, RoutedEventArgs e)
 {
     ServiceReference3.Service1Client client = new ServiceReference3.Service1Client();
     textBox1.Text = client.WypiszLodowke(IdUzytk);
 }
Example #7
0
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     ServiceReference3.Service1Client client = new ServiceReference3.Service1Client();
     string przepis = client.SzukajDaniePoNazwie(textBox.Text);
 }