Advertisement
blackpab

aaaaa

Dec 12th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.09 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9.  
  10. namespace WindowsFormsApplication2
  11. {
  12.  
  13.     public partial class Form1 : Form
  14.     {
  15.         List<Klient> lista;
  16.         public Form1()
  17.         {
  18.             InitializeComponent();
  19.             lista = new List<Klient>();
  20.         }
  21.  
  22.         private void groupBox1_Enter(object sender, EventArgs e)
  23.         {
  24.  
  25.         }
  26.  
  27.         private void button1_Click(object sender, EventArgs e)
  28.         {
  29.  
  30.             Klient k1 = new Klient(textBox1.Text, textBox1.Text, textBox1.Text, Double.Parse(textBox1.Text));
  31.             lista.Add(k1);
  32.             dataGridView1.Rows.Add(k1.Imie, k1.Nazwisko, k1.Numer_konta, k1.Stan_konta);
  33.  
  34.         }
  35.  
  36.         private void button2_Click(object sender, EventArgs e)
  37.         {
  38.  
  39.         }
  40.  
  41.         private void label1_Click(object sender, EventArgs e)
  42.         {
  43.  
  44.         }
  45.  
  46.         private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
  47.         {
  48.  
  49.         }
  50.  
  51.         private void button2_Click_1(object sender, EventArgs e)
  52.         {
  53.             foreach (Klient kl in lista)
  54.             {
  55.                 dataGridView1.Rows.Add(kl.Imie, kl.Nazwisko, kl.Numer_konta, kl.Stan_konta);
  56.  
  57.  
  58.             }
  59.         }
  60.  
  61.         private void button3_Click(object sender, EventArgs e)
  62.         {
  63.             dataGridView1.Rows.Clear();
  64.         }
  65.  
  66.         private void label5_Click(object sender, EventArgs e)
  67.         {
  68.  
  69.         }
  70.  
  71.         private void button4_Click(object sender, EventArgs e)
  72.         {
  73.             dataGridView1.Rows.Clear();
  74.             foreach (Klient kl in lista)
  75.             {
  76.                 if (kl.Imie.Equals(textBox5.Text) || kl.Nazwisko.Equals(textBox5.Text) || kl.Numer_konta.Equals(textBox5.Text) || kl.Stan_konta.Equals(textBox5.Text))
  77.                 {
  78.  
  79.                     dataGridView1.Rows.Add(kl.Imie, kl.Nazwisko, kl.Numer_konta, kl.Stan_konta);
  80.                 }
  81.             }
  82.         }
  83.     }
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement