|
@@ -26,7 +26,8 @@ namespace modulekz
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
|
|
|
- foreach (Book b in books)
|
|
|
+
|
|
|
+ foreach (Book b in books) //пересчет скидки
|
|
|
{
|
|
|
if (sale > 0)
|
|
|
{
|
|
@@ -40,6 +41,11 @@ namespace modulekz
|
|
|
ListBook.ItemsSource = books;
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Покупка книг
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="sender"></param>
|
|
|
+ /// <param name="e"></param>
|
|
|
private void Buy_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
int o = BaseConnect.BaseModel.BuyOrder.Max(x => x.id) + 1;
|
|
@@ -119,6 +125,11 @@ namespace modulekz
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Очищение корзины
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="sender"></param>
|
|
|
+ /// <param name="e"></param>
|
|
|
private void Clear_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
foreach (Book b in bb)
|
|
@@ -129,6 +140,11 @@ namespace modulekz
|
|
|
ListBook.Items.Refresh();
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Переход назад
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="sender"></param>
|
|
|
+ /// <param name="e"></param>
|
|
|
private void Back_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
LoadPage.MainFrame.Navigate(new ListBook(bb));
|
|
@@ -145,7 +161,11 @@ namespace modulekz
|
|
|
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+ /// <summary>
|
|
|
+ /// Удаление позиции
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="sender"></param>
|
|
|
+ /// <param name="e"></param>
|
|
|
private void Delet_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
Button button = (Button)sender;
|