Finished HIANYZOK
This commit is contained in:
1 parent
c45c3d0253
commit
ee16187e24
11 files changed
+19
-1
No files matched your search
Binary file not shown.
@@ -76,10 +76,27 @@ namespace WindowsFormsApp1
|
|||||||
{
|
{
|
||||||
int elso, utolso, mulasztas;
|
int elso, utolso, mulasztas;
|
||||||
if (int.TryParse(textBox3.Text, out elso) && int.TryParse(textBox4.Text, out utolso) && int.TryParse(textBox5.Text, out mulasztas))
|
if (int.TryParse(textBox3.Text, out elso) && int.TryParse(textBox4.Text, out utolso) && int.TryParse(textBox5.Text, out mulasztas))
|
||||||
|
{
|
||||||
|
if (elso > 0 && utolso < 32 && utolso > 0 && elso < 32 && utolso > elso)
|
||||||
{
|
{
|
||||||
Tanulo diak = new Tanulo(textBox1.Text, textBox2.Text, elso, utolso, mulasztas);
|
Tanulo diak = new Tanulo(textBox1.Text, textBox2.Text, elso, utolso, mulasztas);
|
||||||
Data.tanulok.Add(diak);
|
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
|
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
|
Balogh Péter;6a;1;1;5
|
||||||
Horváth Judit;5a;1;1;5
|
Horváth Judit;5a;1;1;5
|
||||||
Juhász János;6a;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
|
Molnár Hanna;4a;29;29;5
|
||||||
Szilágyi Ildikó;3a;29;29;5
|
Szilágyi Ildikó;3a;29;29;5
|
||||||
Török Adél;2a;29;29;6
|
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