Corrected code - Stasiu's review #1

This commit is contained in:
Konrad Pierzyński 2019-01-13 18:05:47 +01:00
parent fbb8fc120c
commit 7e579ad563
4 changed files with 7 additions and 7 deletions

View File

@ -5,11 +5,11 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Magazyn"
mc:Ignorable="d"
Title="Warehouse of Fruits" Height="350" Width="525">
Title="Fruit Warehouse" Height="350" Width="525">
<Grid>
<ListBox x:Name="fruitList" Margin="10,10,90,35"/>
<Button Content="GetList" Margin="0,10,10,0" VerticalAlignment="Top" Click="Button_Click" HorizontalAlignment="Right" Width="75"/>
<Button Content="GetValue" Margin="0,0,90,10" Click="Button_Click_1" HorizontalAlignment="Right" Width="75" Height="20" VerticalAlignment="Bottom"/>
<Button Content="Get List" Margin="0,10,10,0" VerticalAlignment="Top" Click="Button_Click" HorizontalAlignment="Right" Width="75"/>
<Button Content="Summary" Margin="0,0,90,10" Click="Button_Click_1" HorizontalAlignment="Right" Width="75" Height="20" VerticalAlignment="Bottom"/>
</Grid>
</Window>

View File

@ -40,7 +40,7 @@ namespace Magazyn
{
string json = "{\"id\": " + fruit.Id.ToString() + ", \"change\": " + amountChanged.ToString() + " }";
Task<HttpResponseMessage> response = client.PostAsync("https://sysmag.herokuapp.com/api/change-quantity", new StringContent(json, Encoding.UTF8, "application/json"));
Task<HttpResponseMessage> response = client.PostAsync("https://sysmag.herokuapp.com/api/product/change-quantity", new StringContent(json, Encoding.UTF8, "application/json"));
while (response.IsCompleted != true) ;
RefreshListOfFruits();

View File

@ -15,7 +15,7 @@
<Image Source="..\Images\add.png"/>
</Button>
<TextBlock x:Name="fruitAmount" HorizontalAlignment="Left" Margin="159,21,0,27" TextWrapping="Wrap" Text="-1" TextAlignment="Center" Width="16"/>
<TextBlock x:Name="fruitPrice" HorizontalAlignment="Left" Margin="69,16,0,32" TextWrapping="Wrap" Text="fruitPrice" Width="64"/>
<TextBlock x:Name="fruitPrice" HorizontalAlignment="Left" Margin="69,21,0,27" TextWrapping="Wrap" Text="fruitPrice" Width="64"/>
<Image x:Name="imges" HorizontalAlignment="Left" Height="64" VerticalAlignment="Top" Width="64"/>
<TextBlock x:Name="allPrice" HorizontalAlignment="Left" Margin="206,48,0,0" TextWrapping="Wrap" Text="allPrice" TextAlignment="Center" VerticalAlignment="Top" Width="48"/>

View File

@ -5,10 +5,10 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Magazyn.Windows"
mc:Ignorable="d"
Title="Change Amount Window" Height="100" Width="300">
Title="Change Quantity" Height="100" Width="300">
<Grid>
<TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" Text="fruitName" VerticalAlignment="Top" Width="64"/>
<TextBox x:Name="amountToChange" HorizontalAlignment="Left" Margin="10,0,0,10" TextWrapping="Wrap" Text="amount" Width="64" Height="23" VerticalAlignment="Bottom"/>
<TextBox x:Name="amountToChange" HorizontalAlignment="Left" Margin="10,0,0,10" TextWrapping="Wrap" Text="0" Width="64" Height="23" VerticalAlignment="Bottom"/>
<Button x:Name="saveButton" Content="Save" Margin="207,0,10,10" VerticalAlignment="Bottom" Click="saveButton_Click"/>
</Grid>