This commit is contained in:
bulatova_karina 2024-10-29 13:48:26 +04:00
parent 36b3dccf49
commit b87b2493c8
3 changed files with 11 additions and 10 deletions

View File

@ -15,7 +15,7 @@ namespace ClientsContracts.ViewModels
public int StatusId { get; set; } = 0;
[DisplayName("Статус")]
public string StatusName { get; set; } = string.Empty;
public float ViewAmount { get; set; } = 0;
public string ViewAmount { get; set; } = string.Empty;
public string DocAmount { get; set; } = string.Empty;
}
}

View File

@ -26,7 +26,7 @@ namespace WinForms
{
InitializeComponent();
_logic = logic;
myTreeView.setHierarchy(new List<(string, bool)> { ("StatusName", false), ("ViewAmount", false), ("Id", true), ("Name", true) });
}
private void статусыToolStripMenuItem_Click(object sender, EventArgs e)
@ -41,11 +41,12 @@ namespace WinForms
private void FormMain_Load(object sender, EventArgs e)
{
LoadData();
myTreeView.setHierarchy(new List<(string, bool)> { ("StatusName", false), ("ViewAmount", false), ("Id", true), ("Name", true) });
}
private void LoadData()
{
//myTreeView.clear();
myTreeView.clear();
var clients = _logic.ReadList(null);
if (clients != null)
{
@ -53,11 +54,11 @@ namespace WinForms
{
if (!client.Amount.HasValue)
{
client.ViewAmount = 0;
client.ViewAmount = "нет покупок";
}
else
{
client.ViewAmount = client.Amount.Value;
client.ViewAmount = client.Amount.Value.ToString();
}
}
myTreeView.addItems(clients);
@ -158,7 +159,7 @@ namespace WinForms
{
if (!client.Amount.HasValue)
{
client.DocAmount = "нет";
client.DocAmount = "нет покупок";
}
else
{
@ -181,9 +182,9 @@ namespace WinForms
ColumnsRowsWidth = new List<(int Column, int Row)>
{
(10, 10),
(10, 10),
(10, 10),
(10, 10)
(20, 20),
(20, 20),
(15, 15)
},
ColumnUnion = new List<(int StartIndex, int Count)>(),
FilePath = path

View File

@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ChubykinaComponents" Version="1.0.1" />
<PackageReference Include="ChubykinaComponents" Version="1.0.3" />
<PackageReference Include="ComponentsLibraryNet60" Version="1.0.0" />
<PackageReference Include="ControlsLibraryNet60" Version="1.0.0" />
<PackageReference Include="DocumentFormat.OpenXml" Version="3.1.1" />