Finished HIANYZOK
This commit is contained in:
1 parent
c45c3d0253
commit
ee16187e24
11 files changed
+21
-3
No files matched your search
@@ -77,8 +77,25 @@ namespace WindowsFormsApp1
|
||||
int elso, utolso, mulasztas;
|
||||
if (int.TryParse(textBox3.Text, out elso) && int.TryParse(textBox4.Text, out utolso) && int.TryParse(textBox5.Text, out mulasztas))
|
||||
{
|
||||
Tanulo diak = new Tanulo(textBox1.Text, textBox2.Text, elso, utolso, mulasztas);
|
||||
Data.tanulok.Add(diak);
|
||||
if (elso > 0 && utolso < 32 && utolso > 0 && elso < 32 && utolso > elso)
|
||||
{
|
||||
Tanulo diak = new Tanulo(textBox1.Text, textBox2.Text, elso, utolso, mulasztas);
|
||||
Data.tanulok.Add(diak);
|
||||
|
||||
string path = @"C:\Users\szabomarton\Desktop\C#\ProgaOra\20240603\WindowsFormsApp1\WindowsFormsApp1\bin\Debug\szeptember.csv";
|
||||
string addedline = $"{diak.nev};{diak.osztaly};{diak.elso};{diak.utolso};{diak.mulasztott}";
|
||||
using (StreamWriter streamWriter = File.AppendText(path))
|
||||
{
|
||||
streamWriter.WriteLine(addedline);
|
||||
}
|
||||
|
||||
|
||||
MessageBox.Show("Az adatot sikeresen rögzítettük.");
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Az utolsó nap nagyobb legyen mint az első!");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
Név;Osztály;Első nap;Utolsó nap;Mulasztott órák
|
||||
Név;Osztály;Első nap;Utolsó nap;Mulasztott órák
|
||||
Balogh Péter;6a;1;1;5
|
||||
Horváth Judit;5a;1;1;5
|
||||
Juhász János;6a;1;1;5
|
||||
@@ -99,3 +99,4 @@ Kocsis Panna;7a;29;29;5
|
||||
Molnár Hanna;4a;29;29;5
|
||||
Szilágyi Ildikó;3a;29;29;5
|
||||
Török Adél;2a;29;29;6
|
||||
Szabó Márton;12B;1;25;6
|
||||
|
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user