|
@@ -1,4 +1,4 @@
|
|
-## Êëàññû
|
|
|
|
|
|
+## Кла��ы
|
|
|
|
|
|
```
|
|
```
|
|
namespace WpfApp2.model
|
|
namespace WpfApp2.model
|
|
@@ -81,16 +81,16 @@ namespace WpfApp2.model
|
|
ItemsSource="{Binding SparesList}">
|
|
ItemsSource="{Binding SparesList}">
|
|
<DataGrid.Columns>
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn
|
|
<DataGridTextColumn
|
|
-Header="Íàçâàíèå äåòàëè"
|
|
|
|
|
|
+Header="�азвание детали"
|
|
Binding="{Binding name}"/>
|
|
Binding="{Binding name}"/>
|
|
<DataGridTextColumn
|
|
<DataGridTextColumn
|
|
-Header="Öåíà"
|
|
|
|
|
|
+Header="Цена"
|
|
Binding="{Binding price}"/>
|
|
Binding="{Binding price}"/>
|
|
<DataGridTextColumn
|
|
<DataGridTextColumn
|
|
-Header="Êëàññèôèêàöèÿ äåòàëè"
|
|
|
|
|
|
+Header="Кла��ификаци� детали"
|
|
Binding="{Binding detail}"/>
|
|
Binding="{Binding detail}"/>
|
|
<DataGridTextColumn
|
|
<DataGridTextColumn
|
|
-Header="Òèï ÒÑ"
|
|
|
|
|
|
+Header="Тип ТС"
|
|
Binding="{Binding type}"/>
|
|
Binding="{Binding type}"/>
|
|
</DataGrid.Columns>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</DataGrid>
|
|
@@ -100,7 +100,7 @@ Binding="{Binding type}"/>
|
|
VerticalAlignment="Bottom">
|
|
VerticalAlignment="Bottom">
|
|
<Button
|
|
<Button
|
|
x:Name="ExitButton"
|
|
x:Name="ExitButton"
|
|
- Content="Âûõîä"
|
|
|
|
|
|
+ Content="Выход"
|
|
Click="ExitButton_Click"
|
|
Click="ExitButton_Click"
|
|
Height="50"/>
|
|
Height="50"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
@@ -110,7 +110,7 @@ Binding="{Binding type}"/>
|
|
Grid.Column="1"
|
|
Grid.Column="1"
|
|
MinHeight="50">
|
|
MinHeight="50">
|
|
<Label
|
|
<Label
|
|
- Content="Äåòàëü:"
|
|
|
|
|
|
+ Content="Деталь:"
|
|
VerticalAlignment="Center"/>
|
|
VerticalAlignment="Center"/>
|
|
|
|
|
|
<ComboBox
|
|
<ComboBox
|
|
@@ -129,7 +129,7 @@ Binding="{Binding type}"/>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</ComboBox>
|
|
<Label
|
|
<Label
|
|
-Content="Öåíà:"
|
|
|
|
|
|
+Content="Цена:"
|
|
VerticalAlignment="Center"/>
|
|
VerticalAlignment="Center"/>
|
|
<ComboBox
|
|
<ComboBox
|
|
Name="PriceFilterComboBox"
|
|
Name="PriceFilterComboBox"
|
|
@@ -147,7 +147,7 @@ ItemsSource="{Binding SparesPriceList}">
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</ComboBox>
|
|
<Label
|
|
<Label
|
|
-Content="Òèï ÒÑ"
|
|
|
|
|
|
+Content="Тип ТС"
|
|
VerticalAlignment="Center"/>
|
|
VerticalAlignment="Center"/>
|
|
<ComboBox
|
|
<ComboBox
|
|
Name="TypeFilterComboBox"
|
|
Name="TypeFilterComboBox"
|
|
@@ -191,9 +191,9 @@ namespace WpfApp2
|
|
if (PropertyChanged != null)
|
|
if (PropertyChanged != null)
|
|
PropertyChanged(this, new PropertyChangedEventArgs("SparesList"));
|
|
PropertyChanged(this, new PropertyChangedEventArgs("SparesList"));
|
|
}
|
|
}
|
|
- public string selectedDetail = "Äåòàëü";
|
|
|
|
|
|
+ public string selectedDetail = "Деталь";
|
|
public SparesPrice? selectedPrice = null;
|
|
public SparesPrice? selectedPrice = null;
|
|
- public string selectedType = "Òèï ÒÑ";
|
|
|
|
|
|
+ public string selectedType = "Тип ТС";
|
|
|
|
|
|
private IEnumerable<Spares> _SparesList;
|
|
private IEnumerable<Spares> _SparesList;
|
|
public IEnumerable<Spares> SparesList
|
|
public IEnumerable<Spares> SparesList
|
|
@@ -201,9 +201,9 @@ namespace WpfApp2
|
|
get
|
|
get
|
|
{
|
|
{
|
|
return _SparesList
|
|
return _SparesList
|
|
- .Where(c => (c.detail == selectedDetail || selectedDetail == "Äåòàëü"))
|
|
|
|
|
|
+ .Where(c => (c.detail == selectedDetail || selectedDetail == "Деталь"))
|
|
.Where(c => (selectedPrice == null || (c.price >= selectedPrice.PriceFrom && c.price < selectedPrice.PriceTo)))
|
|
.Where(c => (selectedPrice == null || (c.price >= selectedPrice.PriceFrom && c.price < selectedPrice.PriceTo)))
|
|
- .Where(c => (c.type == selectedType || selectedType == "Òèï ÒÑ"));
|
|
|
|
|
|
+ .Where(c => (c.type == selectedType || selectedType == "Тип ТС"));
|
|
}
|
|
}
|
|
set
|
|
set
|
|
{
|
|
{
|
|
@@ -221,10 +221,10 @@ namespace WpfApp2
|
|
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 = "Тип ТС" });
|
|
}
|
|
}
|
|
|
|
|
|
private void ExitButton_Click(object sender, RoutedEventArgs e)
|
|
private void ExitButton_Click(object sender, RoutedEventArgs e)
|
|
@@ -266,23 +266,23 @@ namespace WpfApp2
|
|
{
|
|
{
|
|
new SparesDetail()
|
|
new SparesDetail()
|
|
{
|
|
{
|
|
- title="Äâèãàòåëü"
|
|
|
|
|
|
+ title="Двигатель"
|
|
},
|
|
},
|
|
new SparesDetail()
|
|
new SparesDetail()
|
|
{
|
|
{
|
|
- title="ÊÏÏ"
|
|
|
|
|
|
+ title="КПП"
|
|
},
|
|
},
|
|
new SparesDetail()
|
|
new SparesDetail()
|
|
{
|
|
{
|
|
- title="Ïîäâåñêà"
|
|
|
|
|
|
+ title="Подве�ка"
|
|
},
|
|
},
|
|
new SparesDetail()
|
|
new SparesDetail()
|
|
{
|
|
{
|
|
- title="Ñòåêëà"
|
|
|
|
|
|
+ title="Стекла"
|
|
},
|
|
},
|
|
new SparesDetail()
|
|
new SparesDetail()
|
|
{
|
|
{
|
|
- title="Êîëåñà"
|
|
|
|
|
|
+ title="Коле�а"
|
|
},
|
|
},
|
|
};
|
|
};
|
|
}
|
|
}
|
|
@@ -292,35 +292,35 @@ namespace WpfApp2
|
|
{
|
|
{
|
|
new SparesPrice()
|
|
new SparesPrice()
|
|
{
|
|
{
|
|
- title="Âñå öåíû",
|
|
|
|
|
|
+ title="В�е цены",
|
|
PriceFrom=0,
|
|
PriceFrom=0,
|
|
PriceTo=99999999
|
|
PriceTo=99999999
|
|
|
|
|
|
},
|
|
},
|
|
new SparesPrice()
|
|
new SparesPrice()
|
|
{
|
|
{
|
|
- title="ÁÓ",
|
|
|
|
|
|
+ title="БУ",
|
|
PriceFrom=0,
|
|
PriceFrom=0,
|
|
PriceTo=10000
|
|
PriceTo=10000
|
|
|
|
|
|
},
|
|
},
|
|
new SparesPrice()
|
|
new SparesPrice()
|
|
{
|
|
{
|
|
- title="Äåøåâàÿ",
|
|
|
|
|
|
+ title="Дешева�",
|
|
PriceFrom=10000,
|
|
PriceFrom=10000,
|
|
PriceTo=20000
|
|
PriceTo=20000
|
|
|
|
|
|
},
|
|
},
|
|
new SparesPrice()
|
|
new SparesPrice()
|
|
{
|
|
{
|
|
- title="Ñðåäíÿÿ",
|
|
|
|
|
|
+ title="Средн��",
|
|
PriceFrom=20000,
|
|
PriceFrom=20000,
|
|
PriceTo=50000
|
|
PriceTo=50000
|
|
|
|
|
|
},
|
|
},
|
|
new SparesPrice()
|
|
new SparesPrice()
|
|
{
|
|
{
|
|
- title="Ýëèòíàÿ",
|
|
|
|
|
|
+ title="ÐлитнаÑ�",
|
|
PriceFrom=50000,
|
|
PriceFrom=50000,
|
|
PriceTo=99999999
|
|
PriceTo=99999999
|
|
}
|
|
}
|
|
@@ -334,11 +334,11 @@ namespace WpfApp2
|
|
{
|
|
{
|
|
new SparesType()
|
|
new SparesType()
|
|
{
|
|
{
|
|
- title="Ëåãêàÿ"
|
|
|
|
|
|
+ title="Легка�"
|
|
},
|
|
},
|
|
new SparesType()
|
|
new SparesType()
|
|
{
|
|
{
|
|
- title="Ãðóçîâàÿ"
|
|
|
|
|
|
+ title="Грузова�"
|
|
},
|
|
},
|
|
};
|
|
};
|
|
}
|
|
}
|
|
@@ -346,30 +346,30 @@ namespace WpfApp2
|
|
{
|
|
{
|
|
return new Spares[]{
|
|
return new Spares[]{
|
|
new Spares{
|
|
new Spares{
|
|
- type="Ëåãêàÿ",
|
|
|
|
- name="Äâèãàòåëü ÌÁ140(ÎÊ2281.4)",
|
|
|
|
|
|
+ type="Легка�",
|
|
|
|
+ name="Двигатель МБ140(ОК2281.4)",
|
|
price = 72000,
|
|
price = 72000,
|
|
- detail="Äâèãàòåëü"},
|
|
|
|
|
|
+ detail="Двигатель"},
|
|
new Spares{
|
|
new Spares{
|
|
- type="Ëåãêàÿ",
|
|
|
|
- name="ÊÏÏ 5-ÑÒ ÐÑ-ÏÄÐ",
|
|
|
|
|
|
+ type="Легка�",
|
|
|
|
+ name="КПП 5-СТ РС-ПДР",
|
|
price = 20000,
|
|
price = 20000,
|
|
- detail="ÊÏÏ"},
|
|
|
|
|
|
+ detail="КПП"},
|
|
new Spares{
|
|
new Spares{
|
|
- type="Ãðóçîâàÿ",
|
|
|
|
- name="Ïîäâåñêà ÏÄÐÑ1337",
|
|
|
|
|
|
+ type="Грузова�",
|
|
|
|
+ name="Подве�ка ПДРС1337",
|
|
price = 15000,
|
|
price = 15000,
|
|
- detail="Ïîäâåñêà"},
|
|
|
|
|
|
+ detail="Подве�ка"},
|
|
new Spares{
|
|
new Spares{
|
|
- type="Ëåãêàÿ",
|
|
|
|
- name="Øèíà 15-Ð",
|
|
|
|
|
|
+ type="Легка�",
|
|
|
|
+ name="Шина 15-Р",
|
|
price = 3000,
|
|
price = 3000,
|
|
- detail="Êîëåñà"},
|
|
|
|
|
|
+ detail="Коле�а"},
|
|
new Spares{
|
|
new Spares{
|
|
- type="Ãðóçîâàÿ",
|
|
|
|
- name="Ëîáîâîå ñòåêëî ÑÒ150",
|
|
|
|
|
|
+ type="Грузова�",
|
|
|
|
+ name="Лобовое �текло СТ150",
|
|
price = 40000,
|
|
price = 40000,
|
|
- detail="Ñòåêëà"},
|
|
|
|
|
|
+ detail="Стекла"},
|
|
|
|
|
|
};
|
|
};
|
|
}
|
|
}
|
|
@@ -378,7 +378,7 @@ namespace WpfApp2
|
|
}
|
|
}
|
|
```
|
|
```
|
|
|
|
|
|
-# Ñêðèíû ðàáîòû
|
|
|
|
|
|
+# Скрины работы
|
|
|
|
|
|
![](./img/1.jpg)
|
|
![](./img/1.jpg)
|
|
|
|
|