forked from s442333/DINO_SCRUM
Corrected code - Stasiu's review #1
This commit is contained in:
parent
fbb8fc120c
commit
7e579ad563
@ -5,11 +5,11 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Magazyn"
|
xmlns:local="clr-namespace:Magazyn"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Warehouse of Fruits" Height="350" Width="525">
|
Title="Fruit Warehouse" Height="350" Width="525">
|
||||||
<Grid>
|
<Grid>
|
||||||
<ListBox x:Name="fruitList" Margin="10,10,90,35"/>
|
<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="Get List" 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="Summary" Margin="0,0,90,10" Click="Button_Click_1" HorizontalAlignment="Right" Width="75" Height="20" VerticalAlignment="Bottom"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
@ -40,7 +40,7 @@ namespace Magazyn
|
|||||||
{
|
{
|
||||||
string json = "{\"id\": " + fruit.Id.ToString() + ", \"change\": " + amountChanged.ToString() + " }";
|
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) ;
|
while (response.IsCompleted != true) ;
|
||||||
|
|
||||||
RefreshListOfFruits();
|
RefreshListOfFruits();
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<Image Source="..\Images\add.png"/>
|
<Image Source="..\Images\add.png"/>
|
||||||
</Button>
|
</Button>
|
||||||
<TextBlock x:Name="fruitAmount" HorizontalAlignment="Left" Margin="159,21,0,27" TextWrapping="Wrap" Text="-1" TextAlignment="Center" Width="16"/>
|
<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"/>
|
<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"/>
|
<TextBlock x:Name="allPrice" HorizontalAlignment="Left" Margin="206,48,0,0" TextWrapping="Wrap" Text="allPrice" TextAlignment="Center" VerticalAlignment="Top" Width="48"/>
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Magazyn.Windows"
|
xmlns:local="clr-namespace:Magazyn.Windows"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Change Amount Window" Height="100" Width="300">
|
Title="Change Quantity" Height="100" Width="300">
|
||||||
<Grid>
|
<Grid>
|
||||||
<TextBlock x:Name="fruitName" HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" Text="fruitName" VerticalAlignment="Top" Width="64"/>
|
<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"/>
|
<Button x:Name="saveButton" Content="Save" Margin="207,0,10,10" VerticalAlignment="Bottom" Click="saveButton_Click"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
Loading…
Reference in New Issue
Block a user