예제 #1
0
        private void rodjendaniBtn_Click(object sender, EventArgs e)
        {
            HttpResponseMessage response = klijentiService.GetActionResponse("SearchByBirthDate");

            if (response.IsSuccessStatusCode)
            {
                List <Klijenti_Result> klijenti = response.Content.ReadAsAsync <List <Klijenti_Result> >().Result;
                KlijentiGridView.DataSource = klijenti;
                KlijentiGridView.ClearSelection();
            }
            else
            {
                MessageBox.Show("Error Code" + response.StatusCode + " : Message - " + response.ReasonPhrase);
            }
        }
예제 #2
0
        private void traziButton_Click(object sender, EventArgs e)
        {
            HttpResponseMessage response = klijentiService.GetActionResponse("SearchByName", imePrezimeInput.Text.Trim());

            if (response.IsSuccessStatusCode)
            {
                List <Klijenti_Result> klijenti = response.Content.ReadAsAsync <List <Klijenti_Result> >().Result;
                KlijentiGridView.DataSource = klijenti;
                KlijentiGridView.ClearSelection();
            }
            else
            {
                MessageBox.Show("Error Code" + response.StatusCode + " : Message - " + response.ReasonPhrase);
            }
        }