|
@@ -1,4 +1,4 @@
|
|
-## 孰囫覃
|
|
|
|
|
|
+## 袣谢邪褋褋褘
|
|
|
|
|
|
```
|
|
```
|
|
namespace WpfApp2.model
|
|
namespace WpfApp2.model
|
|
@@ -48,21 +48,21 @@ namespace WpfApp2.model
|
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
-## Mainwindow.xaml(如戾礤龛� � 镳铠腩� 疣犷螓)
|
|
|
|
|
|
+## Mainwindow.xaml(袠蟹屑械薪械薪懈褟 褋 锌褉芯褕谢芯泄 褉邪斜芯褌褘)
|
|
|
|
|
|
-念徉忤� 镟痼 耱痤麇� 潆� 铗钺疣驽龛� 桧纛痨圉梃
|
|
|
|
|
|
+袛芯斜邪胁懈谢 锌邪褉褍 褋褌褉芯褔械泻 写谢褟 芯褌芯斜褉邪卸械薪懈褟 懈薪褎芯褉屑邪褑懈懈
|
|
|
|
|
|
```
|
|
```
|
|
<DataGridTextColumn
|
|
<DataGridTextColumn
|
|
- Header="泥蜞 玎忸玎"
|
|
|
|
|
|
+ Header="袛邪褌邪 蟹邪胁芯蟹邪"
|
|
Binding="{Binding date,StringFormat='dd.MM.yyyy'}"/>
|
|
Binding="{Binding date,StringFormat='dd.MM.yyyy'}"/>
|
|
<DataGridTextColumn
|
|
<DataGridTextColumn
|
|
- Header="袜腓麒�"
|
|
|
|
|
|
+ Header="袧邪谢懈褔懈械"
|
|
Binding="{Binding available}"/>
|
|
Binding="{Binding available}"/>
|
|
```
|
|
```
|
|
|
|
|
|
-## Mainwindow.xaml.cs(如戾礤龛� � 镳铠腩� 疣犷螓)
|
|
|
|
-镳铒桉嚯 csv
|
|
|
|
|
|
+## Mainwindow.xaml.cs(袠蟹屑械薪械薪懈褟 褋 锌褉芯褕谢芯泄 褉邪斜芯褌褘)
|
|
|
|
+锌褉芯锌懈褋邪谢 csv
|
|
```
|
|
```
|
|
public MainWindow()
|
|
public MainWindow()
|
|
{
|
|
{
|
|
@@ -71,10 +71,10 @@ namespace WpfApp2.model
|
|
Globals.dataProvider = new LocalDataProvider();
|
|
Globals.dataProvider = new LocalDataProvider();
|
|
SparesList = Globals.dataProvider.getSpares();
|
|
SparesList = Globals.dataProvider.getSpares();
|
|
SparesDetailList = Globals.dataProvider.getDetail().ToList();
|
|
SparesDetailList = Globals.dataProvider.getDetail().ToList();
|
|
- SparesDetailList.Insert(0, new SparesDetail { title = "腻蜞朦" });
|
|
|
|
|
|
+ SparesDetailList.Insert(0, new SparesDetail { title = "袛械褌邪谢褜" });
|
|
SparesPriceList = Globals.dataProvider.getPrice().ToList();
|
|
SparesPriceList = Globals.dataProvider.getPrice().ToList();
|
|
SparesTypeList = Globals.dataProvider.getType().ToList();
|
|
SparesTypeList = Globals.dataProvider.getType().ToList();
|
|
- SparesTypeList.Insert(0, new SparesType { title = "诣� 已" });
|
|
|
|
|
|
+ SparesTypeList.Insert(0, new SparesType { title = "孝懈锌 孝小" });
|
|
Globals.dataProvider = new CSVDataProvider();
|
|
Globals.dataProvider = new CSVDataProvider();
|
|
SparesList = Globals.dataProvider.getSpares();
|
|
SparesList = Globals.dataProvider.getSpares();
|
|
}
|
|
}
|
|
@@ -86,7 +86,7 @@ namespace WpfApp2.model
|
|
Invalidate();
|
|
Invalidate();
|
|
}
|
|
}
|
|
```
|
|
```
|
|
-# 念徉忤� 眍恹� 觌囫�
|
|
|
|
|
|
+# 袛芯斜邪胁懈谢 薪芯胁褘泄 泻谢邪褋褋
|
|
|
|
|
|
```
|
|
```
|
|
using System;
|
|
using System;
|
|
@@ -106,7 +106,7 @@ namespace WpfApp2.model
|
|
{
|
|
{
|
|
private List<Spares> SparesList;
|
|
private List<Spares> SparesList;
|
|
|
|
|
|
- // 觐眈蝠箨蝾� 觌囫襦
|
|
|
|
|
|
+ // 泻芯薪褋褌褉褍泻褌芯褉 泻谢邪褋褋邪
|
|
public CSVDataProvider()
|
|
public CSVDataProvider()
|
|
{
|
|
{
|
|
using (var reader = new StreamReader("./data.csv"))
|
|
using (var reader = new StreamReader("./data.csv"))
|
|
@@ -115,8 +115,8 @@ namespace WpfApp2.model
|
|
reader,
|
|
reader,
|
|
CultureInfo.InvariantCulture))
|
|
CultureInfo.InvariantCulture))
|
|
{
|
|
{
|
|
- // CsvHelper 桉镱朦珞弪 铗腩驽眄铄 黩屙桢 麇疱�
|
|
|
|
- // yeld, 镱�铎� 耩噻� 镳孱狃噻箦� � 耧桉铌
|
|
|
|
|
|
+ // CsvHelper 懈褋锌芯谢褜蟹褍械褌 芯褌谢芯卸械薪薪芯械 褔褌械薪懈械 褔械褉械蟹
|
|
|
|
+ // yeld, 锌芯褝褌芯屑褍 褋褉邪蟹褍 锌褉械芯斜褉邪蟹褍械屑 胁 褋锌懈褋芯泻
|
|
SparesList = csv.GetRecords<Spares>().ToList();
|
|
SparesList = csv.GetRecords<Spares>().ToList();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -130,7 +130,7 @@ namespace WpfApp2.model
|
|
|
|
|
|
```
|
|
```
|
|
|
|
|
|
-# 殃痂睇 疣犷螓
|
|
|
|
|
|
+# 小泻褉懈薪褘 褉邪斜芯褌褘
|
|
|
|
|
|
|
|
|
|
|
|
|