еще правки в 4 лабе

This commit is contained in:
Илья 2024-11-05 19:10:19 +04:00
parent fa1e222b91
commit 8a71a24eee
37 changed files with 9 additions and 12 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -9,11 +9,11 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\PluginsConventionLibrary\PluginsConventionLibrary.csproj" /> <PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Plugins\" /> <ProjectReference Include="..\PluginsConventionLibrary\PluginsConventionLibrary.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -4,6 +4,7 @@ using PortalAccountsContracts.BindingModels;
using PortalAccountsContracts.BusinessLogicsContracts; using PortalAccountsContracts.BusinessLogicsContracts;
using PortalAccountsContracts.ViewModels; using PortalAccountsContracts.ViewModels;
using RodionovLibrary.NonVisualComponents.HelperModels; using RodionovLibrary.NonVisualComponents.HelperModels;
using System.Text;
namespace PortalAccountsView namespace PortalAccountsView
{ {
@ -176,6 +177,7 @@ namespace PortalAccountsView
private void ÄîêóìåíòÑÒàáëèöåéToolStripMenuItem_Click(object sender, EventArgs e) private void ÄîêóìåíòÑÒàáëèöåéToolStripMenuItem_Click(object sender, EventArgs e)
{ {
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
using var dialog = new SaveFileDialog using var dialog = new SaveFileDialog
{ {
Filter = "PDF Files|*.pdf" Filter = "PDF Files|*.pdf"
@ -201,7 +203,7 @@ namespace PortalAccountsView
(2, 0, "Ðîëü", "RoleName"), (2, 0, "Ðîëü", "RoleName"),
(3, 0, "Ðåéòèíã", "OutputRating") (3, 0, "Ðåéòèíã", "OutputRating")
}, },
Data = accounts Data = accounts.OrderBy(x => x.Id).ToList()
}); });
MessageBox.Show("Ãîòîâî!"); MessageBox.Show("Ãîòîâî!");
} }

View File

@ -122,12 +122,10 @@ namespace PortalAccountsView
Title = "Аккаунты без рейтинга", Title = "Аккаунты без рейтинга",
Paragraphs = paragraphs.ToArray() Paragraphs = paragraphs.ToArray()
}); });
MessageBox.Show("Готово!");
return true; return true;
} }
catch (Exception ex) catch (Exception)
{ {
MessageBox.Show("Произошла ошибка: " + ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false; return false;
} }
} }
@ -156,12 +154,10 @@ namespace PortalAccountsView
}, },
Data = accounts.OrderBy(x => x.Id).ToList() Data = accounts.OrderBy(x => x.Id).ToList()
}); });
MessageBox.Show("Готово!");
return true; return true;
} }
catch (Exception ex) catch (Exception)
{ {
MessageBox.Show("Произошла ошибка: " + ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false; return false;
} }
} }
@ -196,12 +192,10 @@ namespace PortalAccountsView
LegendLocation = Location.Bottom, LegendLocation = Location.Bottom,
Data = data Data = data
}); });
MessageBox.Show("Готово!");
return true; return true;
} }
catch (Exception ex) catch (Exception)
{ {
MessageBox.Show("Произошла ошибка: " + ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false; return false;
} }
} }

View File

@ -17,6 +17,7 @@
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="7.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>