diff --git a/20240603/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo b/20240603/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo index cb310d2..706bfb0 100644 Binary files a/20240603/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo and b/20240603/WindowsFormsApp1/.vs/WindowsFormsApp1/v16/.suo differ diff --git a/20240603/WindowsFormsApp1/WindowsFormsApp1/Form1.cs b/20240603/WindowsFormsApp1/WindowsFormsApp1/Form1.cs index 3b30350..72e338a 100644 --- a/20240603/WindowsFormsApp1/WindowsFormsApp1/Form1.cs +++ b/20240603/WindowsFormsApp1/WindowsFormsApp1/Form1.cs @@ -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 diff --git a/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe b/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe index 20143e8..a359fe6 100644 Binary files a/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe and b/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe differ diff --git a/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb b/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb index 56aec2a..c44dadc 100644 Binary files a/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb and b/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb differ diff --git a/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/szeptember.csv b/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/szeptember.csv index b6fa218..1f56452 100644 --- a/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/szeptember.csv +++ b/20240603/WindowsFormsApp1/WindowsFormsApp1/bin/Debug/szeptember.csv @@ -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 diff --git a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache index a6920de..0e9caef 100644 Binary files a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index c3115ad..de080d1 100644 Binary files a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache index 84695b8..f5e894a 100644 Binary files a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache and b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.AssemblyReference.cache differ diff --git a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache index 2a849a4..dc1fd9c 100644 Binary files a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache and b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache differ diff --git a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe index 20143e8..a359fe6 100644 Binary files a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe and b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe differ diff --git a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb index 56aec2a..c44dadc 100644 Binary files a/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb and b/20240603/WindowsFormsApp1/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb differ