finished the console part
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{"RootPath":"E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20250219\\asztali_minta_valasztas\\Valasztas\\Valasztas","ProjectFileName":"Valasztas.csproj","Configuration":"Debug|AnyCPU","FrameworkPath":"","Sources":[{"SourceFile":"Program.cs"},{"SourceFile":"Properties\\AssemblyInfo.cs"},{"SourceFile":"obj\\Debug\\.NETFramework,Version=v4.7.2.AssemblyAttributes.cs"}],"References":[{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\Microsoft.CSharp.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\mscorlib.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Core.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.DataSetExtensions.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Data.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Net.Http.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""},{"Reference":"C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.7.2\\System.Xml.Linq.dll","ResolvedFrom":"","OriginalItemSpec":"","Name":"","EmbedInteropTypes":false,"CopyLocal":false,"IsProjectReference":false,"ProjectPath":""}],"Analyzers":[],"Outputs":[{"OutputItemFullPath":"E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20250219\\asztali_minta_valasztas\\Valasztas\\Valasztas\\bin\\Debug\\Valasztas.exe","OutputItemRelativePath":"Valasztas.exe"},{"OutputItemFullPath":"E:\\Házi\\Programozás\\C#\\Suli\\ProgaOra\\20250219\\asztali_minta_valasztas\\Valasztas\\Valasztas\\bin\\Debug\\Valasztas.pdb","OutputItemRelativePath":"Valasztas.pdb"}],"CopyToOutputEntries":[]}
|
||||
@@ -94,7 +94,23 @@ namespace Valasztas
|
||||
$"A legtöbb szavazatot kapta: " +
|
||||
$"\t{item.VezetekNev} {item.KeresztNev} {(item.Part == "-" ? fuggetlen : item.Part)}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ValosztokeruletiGyoztesek(List<Kepviselo> kepviselok)
|
||||
{
|
||||
var asd = kepviselok.OrderBy(x => x.Szavazat).OrderBy(x => x.Kerulet).GroupBy(x => x.Kerulet);
|
||||
|
||||
StreamWriter streamWriter = new StreamWriter("kepviselok.txt", false);
|
||||
|
||||
foreach (var item in asd)
|
||||
{
|
||||
Kepviselo kepviselo = item.Last();
|
||||
streamWriter.WriteLine($"{kepviselo.Kerulet} {kepviselo.VezetekNev} {kepviselo.KeresztNev} {kepviselo.Part}");
|
||||
}
|
||||
|
||||
streamWriter.Close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -113,6 +129,9 @@ namespace Valasztas
|
||||
|
||||
Kepviselo.SzavazatKiir(kepviselok, nev);
|
||||
Kepviselo.Legtobb(kepviselok);
|
||||
|
||||
Console.WriteLine("A kepviselok.txt fájl létrehozása");
|
||||
Kepviselo.ValosztokeruletiGyoztesek(kepviselok);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
1 Petrezselyem Petra ZEP
|
||||
|
||||
2 Oldalas Olga HEP
|
||||
|
||||
3 Tejes Attila TISZ
|
||||
|
||||
4 Monitor Tibor -
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
137ddb1975586287657f37337b64d051167bb6a147915d9fb5b8eb94b1093509
|
||||
5bb56c9ef8259863da41b9966ff000324a4ac45ce033dd510671b53b9ecdc07a
|
||||
|
||||
@@ -5,3 +5,10 @@ C:\Users\szabomarton\Desktop\ProgaOra\20250219\asztali_minta_valasztas\Valasztas
|
||||
C:\Users\szabomarton\Desktop\ProgaOra\20250219\asztali_minta_valasztas\Valasztas\Valasztas\obj\Debug\Valasztas.csproj.CoreCompileInputs.cache
|
||||
C:\Users\szabomarton\Desktop\ProgaOra\20250219\asztali_minta_valasztas\Valasztas\Valasztas\obj\Debug\Valasztas.exe
|
||||
C:\Users\szabomarton\Desktop\ProgaOra\20250219\asztali_minta_valasztas\Valasztas\Valasztas\obj\Debug\Valasztas.pdb
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20250219\asztali_minta_valasztas\Valasztas\Valasztas\bin\Debug\Valasztas.exe.config
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20250219\asztali_minta_valasztas\Valasztas\Valasztas\bin\Debug\Valasztas.exe
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20250219\asztali_minta_valasztas\Valasztas\Valasztas\bin\Debug\Valasztas.pdb
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20250219\asztali_minta_valasztas\Valasztas\Valasztas\obj\Debug\Valasztas.csproj.AssemblyReference.cache
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20250219\asztali_minta_valasztas\Valasztas\Valasztas\obj\Debug\Valasztas.csproj.CoreCompileInputs.cache
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20250219\asztali_minta_valasztas\Valasztas\Valasztas\obj\Debug\Valasztas.exe
|
||||
E:\Házi\Programozás\C#\Suli\ProgaOra\20250219\asztali_minta_valasztas\Valasztas\Valasztas\obj\Debug\Valasztas.pdb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user