Merge branch 'master' of s434739/DINO_SCRUM into master

This commit is contained in:
s1202077 2019-01-21 20:54:10 +00:00 committed by Gogs
commit 0f835efe8c
2 changed files with 6 additions and 22 deletions

View File

@ -21,23 +21,3 @@
</Grid>
</Window>
<!--<Window x:Class="Magazyn.MainWindow"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Magazyn"
mc:Ignorable="d"
Title="Fruit Warehouse" Height="400" Width="520">
<Grid>
<ListBox x:Name="fruitList" Margin="10,35,10,95"/>
<Button Name="sum" Content="Wartość Magazynu" Margin="0,0,10,10" Height="35" Background="Teal" Click="Button_Click_1" HorizontalAlignment="Right" Width="164" VerticalAlignment="Bottom"/>
<ProgressBar Name="loadingContent" HorizontalAlignment="Right" Height="10" Margin="0,0,10,80" Width="100" VerticalAlignment="Bottom"/>
<Label Content="Fruit list:" FontWeight="Bold" HorizontalAlignment="Left" Margin="10,4,0,0" VerticalAlignment="Top" Width="100"/>
</Grid>
</Window>-->

View File

@ -77,17 +77,21 @@ namespace Magazyn.Windows
if ((quantity + amount > maxAmount) && amount >= 0 && type == 1)
{
MessageBox.Show("Przepełnienie magazynu", "Przepełnienie, maxymalnie 2500 sztuk", MessageBoxButton.OK, MessageBoxImage.Error);
MessageBox.Show("Przepełnienie magazynu", "Przepełnienie, maksymalnie 2500 sztuk", MessageBoxButton.OK, MessageBoxImage.Error);
amountToChange.Text = "0";
return;
} else if ((quantity - amount < 0) && amount >= 0 && type == -1)
{
MessageBox.Show("Niedobór magazynu", "Ilość przedmiotów nie możę być mniejsza niz 0", MessageBoxButton.OK, MessageBoxImage.Error);
amountToChange.Text = "0";
return;
} else
{
SaveChangingAmountOfFruits.Invoke((type > 0) ? amount : -amount);
this.Close();
}
this.Close();
}
private void cancelButton_Click(object sender, RoutedEventArgs e)