Added searching, added server address to app.config
This commit is contained in:
parent
1be5d1f7c0
commit
9b3344aa72
@ -102,9 +102,9 @@ namespace Magazyn
|
||||
{
|
||||
pageBlock.Text = (page+1).ToString();
|
||||
|
||||
Task<HttpResponseMessage> response = client.GetAsync(serverUrl+"get-all?page=" + page.ToString() + "&size=" + size.ToString());
|
||||
Task<HttpResponseMessage> response = client.GetAsync(serverUrl+"get-all?page=" + page.ToString() + "&size=" + size.ToString() + "&search=" + ((string.IsNullOrEmpty(searchBox.Text) || string.IsNullOrWhiteSpace(searchBox.Text)) ? "none" : searchBox.Text) );
|
||||
while (response.IsCompleted != true) ;
|
||||
|
||||
|
||||
if (response.Result.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
ErrorWindow window = new ErrorWindow("Nastąpił błąd połączenia z serwerem.");
|
||||
@ -112,7 +112,6 @@ namespace Magazyn
|
||||
window.ShowDialog();
|
||||
|
||||
page = 0;
|
||||
size = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
@ -208,7 +207,8 @@ namespace Magazyn
|
||||
|
||||
private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
//RefreshListOfFruits();
|
||||
page = 0;
|
||||
RefreshListOfFruits();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user