lab3
This commit is contained in:
parent
36b3dccf49
commit
b87b2493c8
@ -15,7 +15,7 @@ namespace ClientsContracts.ViewModels
|
|||||||
public int StatusId { get; set; } = 0;
|
public int StatusId { get; set; } = 0;
|
||||||
[DisplayName("Статус")]
|
[DisplayName("Статус")]
|
||||||
public string StatusName { get; set; } = string.Empty;
|
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;
|
public string DocAmount { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -26,7 +26,7 @@ namespace WinForms
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_logic = logic;
|
_logic = logic;
|
||||||
myTreeView.setHierarchy(new List<(string, bool)> { ("StatusName", false), ("ViewAmount", false), ("Id", true), ("Name", true) });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void статусыToolStripMenuItem_Click(object sender, EventArgs e)
|
private void статусыToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
@ -41,11 +41,12 @@ namespace WinForms
|
|||||||
private void FormMain_Load(object sender, EventArgs e)
|
private void FormMain_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
LoadData();
|
LoadData();
|
||||||
|
myTreeView.setHierarchy(new List<(string, bool)> { ("StatusName", false), ("ViewAmount", false), ("Id", true), ("Name", true) });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadData()
|
private void LoadData()
|
||||||
{
|
{
|
||||||
//myTreeView.clear();
|
myTreeView.clear();
|
||||||
var clients = _logic.ReadList(null);
|
var clients = _logic.ReadList(null);
|
||||||
if (clients != null)
|
if (clients != null)
|
||||||
{
|
{
|
||||||
@ -53,11 +54,11 @@ namespace WinForms
|
|||||||
{
|
{
|
||||||
if (!client.Amount.HasValue)
|
if (!client.Amount.HasValue)
|
||||||
{
|
{
|
||||||
client.ViewAmount = 0;
|
client.ViewAmount = "нет покупок";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
client.ViewAmount = client.Amount.Value;
|
client.ViewAmount = client.Amount.Value.ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myTreeView.addItems(clients);
|
myTreeView.addItems(clients);
|
||||||
@ -158,7 +159,7 @@ namespace WinForms
|
|||||||
{
|
{
|
||||||
if (!client.Amount.HasValue)
|
if (!client.Amount.HasValue)
|
||||||
{
|
{
|
||||||
client.DocAmount = "нет";
|
client.DocAmount = "нет покупок";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -181,9 +182,9 @@ namespace WinForms
|
|||||||
ColumnsRowsWidth = new List<(int Column, int Row)>
|
ColumnsRowsWidth = new List<(int Column, int Row)>
|
||||||
{
|
{
|
||||||
(10, 10),
|
(10, 10),
|
||||||
(10, 10),
|
(20, 20),
|
||||||
(10, 10),
|
(20, 20),
|
||||||
(10, 10)
|
(15, 15)
|
||||||
},
|
},
|
||||||
ColumnUnion = new List<(int StartIndex, int Count)>(),
|
ColumnUnion = new List<(int StartIndex, int Count)>(),
|
||||||
FilePath = path
|
FilePath = path
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ChubykinaComponents" Version="1.0.1" />
|
<PackageReference Include="ChubykinaComponents" Version="1.0.3" />
|
||||||
<PackageReference Include="ComponentsLibraryNet60" Version="1.0.0" />
|
<PackageReference Include="ComponentsLibraryNet60" Version="1.0.0" />
|
||||||
<PackageReference Include="ControlsLibraryNet60" Version="1.0.0" />
|
<PackageReference Include="ControlsLibraryNet60" Version="1.0.0" />
|
||||||
<PackageReference Include="DocumentFormat.OpenXml" Version="3.1.1" />
|
<PackageReference Include="DocumentFormat.OpenXml" Version="3.1.1" />
|
||||||
|
Loading…
Reference in New Issue
Block a user