コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            HttpResponseMessage response = null;

            foreach (DataGridViewRow row in uceniciGridView.Rows)
            {
                Prisustvo prisustvo = new Prisustvo();
                prisustvo.PrisustvoId = (int)row.Cells["PrisustvoId"].Value;
                prisustvo.Prisutan    = Convert.ToBoolean(row.Cells["Prisutan"].Value);
                prisustvo.Opravdano   = Convert.ToBoolean(row.Cells["IsOpravdano"].Value);
                prisustvo.BrojSati    = Convert.ToInt32(brojSatiReadOnly.Text);
                prisustvo.CasId       = Convert.ToInt32(casIdTest.Text);
                prisustvo.UcenikId    = (int)row.Cells["UcenikId"].Value;

                response = _prisustvoService.PutResponse(prisustvo);
            }
            if (response.IsSuccessStatusCode)
            {
                MessageBox.Show("Izostanci uspješno dodani");

                int casId = (int)casoviGridView.CurrentRow.Cells["CasId"].Value;
                response = _prisustvoService.GetActionResponse("prisutniUcenici", casId.ToString());
                if (response.IsSuccessStatusCode)
                {
                    List <UcenikVM> ucenici = new List <UcenikVM>();
                    ucenici = response.Content.ReadAsAsync <List <UcenikVM> >().Result;

                    ucenikInput.DataSource    = ucenici;
                    ucenikInput.ValueMember   = "UcenikId";
                    ucenikInput.DisplayMember = "ImePrezime";
                }
            }
        }
コード例 #2
0
 public async Task <IPagedList <Administrator_NameSelect> > GetPagedListAsync(int pageNummber = 1, int pageSize = 10)
 {
     return(await Task.Factory.StartNew(() => {
         HttpResponseMessage response = administratorService.GetActionResponse("SearchByName");
         return response.Content.ReadAsAsync <List <Administrator_NameSelect> >().Result.ToPagedList(pageNummber, pageSize);
     }));
 }
コード例 #3
0
ファイル: StudentDetalj.cs プロジェクト: cajacaja/TutorApp
 public async Task <IPagedList <OcjenaStudent_SelectComments_Result> > GetPagedListAsync(int pageNummber = 1, int pageSize = 5)
 {
     return(await Task.Factory.StartNew(() => {
         HttpResponseMessage response = ocjenaService.GetActionResponse("GetOcjene", studentId.ToString());
         return response.Content.ReadAsAsync <List <OcjenaStudent_SelectComments_Result> >().Result.ToPagedList(pageNummber, pageSize);
     }));
 }
コード例 #4
0
        public LoginForm()
        {
            InitializeComponent();
            this.AutoValidate = AutoValidate.Disable;

            HttpResponseMessage response = tutorService.GetActionResponse("TutorCount", "1/1/3");
        }
コード例 #5
0
        public TutorDetalj(int id)
        {
            InitializeComponent();



            var response = tutorService.GetActionResponse("TutorDetails", id.ToString());

            if (response.IsSuccessStatusCode)
            {
                Tutor = response.Content.ReadAsAsync <Tutor_Details_Result>().Result;
                var ms = new MemoryStream(Tutor.TutorTumbnail);
                tutorPictureBox.Image   = Image.FromStream(ms);
                ImeInput.Text           = Tutor.Ime;
                PrezimeInput.Text       = Tutor.Prezime;
                EmailInput.Text         = Tutor.Email;
                TelefonInput.Text       = Tutor.Telefon;
                AdresaInput.Text        = Tutor.Adresa;
                KorisnickoImeInput.Text = Tutor.KorisnickoIme;
                PredmetInput.Text       = Tutor.Predmet;
                CijenaCasaInput.Text    = Tutor.CijenaCasa.ToString() + " KM";
                RadnoStanjeInput.Text   = Tutor.RadnoStanje;
                NazivUstanoveInput.Text = Tutor.NazivUstanove;
                FillList(id);
                BindGridOne(id);
                BindGridTwo(id);
                UpisiOcjenu(id);

                ProvjeriStatsuKorisnika(id);
            }
            else
            {
                MessageBox.Show("Pogresan tutor");
            }
        }
コード例 #6
0
ファイル: TutorForm.cs プロジェクト: cajacaja/TutorApp
 public async Task <IPagedList <Tutor_SearchSelect_Result> > GetPagedListAsync(int pageNummber = 1, int pageSize = 5)
 {
     return(await Task.Factory.StartNew(() => {
         var response = tutorService.GetActionResponse("TutorFilter");
         return response.Content.ReadAsAsync <List <Tutor_SearchSelect_Result> >().Result.ToPagedList(pageNummber, pageSize);
     }));
 }
コード例 #7
0
        public DetaljiUpita(int upitID)
        {
            UID = upitID;
            InitializeComponent();

            HttpResponseMessage response = UpitiService.GetActionResponse("GetDetalji", upitID.ToString(), Global.prijavljenaKompanija.KompanijaID.ToString());


            if (response.IsSuccessStatusCode)
            {
                if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
                {
                    u = null;
                }
                else if (response.IsSuccessStatusCode)
                {
                    u = response.Content.ReadAsAsync <DetaljiUpita_Result>().Result;
                    if (!u.Odgovoreno.GetValueOrDefault())
                    {
                        HttpResponseMessage response2 = PonudeService.GetActionResponse("GetAllByKategorijaId", u.KategorijaID.ToString());

                        if (response2.IsSuccessStatusCode)
                        {
                            p = response2.Content.ReadAsAsync <List <ServisInfo_API.Models.Ponude> >().Result;
                        }
                    }
                    FillForm();
                }
            }
        }
コード例 #8
0
        public ReportPredmet()
        {
            InitializeComponent();

            string datumOd = Convert.ToDateTime(datumOdDatePicker.MinDate.ToString()).ToString("yyyy-MM-dd");
            string datumDo = Convert.ToDateTime(datumOdDatePicker.MaxDate.ToString()).ToString("yyyy-MM-dd");

            string parametars = "0/" + datumOd + "/" + datumDo;

            datumOdDatePicker.CustomFormat = " ";
            datumOdDatePicker.Format       = DateTimePickerFormat.Custom;
            DatumDoDatePicker.CustomFormat = " ";
            DatumDoDatePicker.Format       = DateTimePickerFormat.Custom;

            HttpResponseMessage response = predmetService.GetActionResponse("Report", parametars);

            if (response.IsSuccessStatusCode)
            {
                var list = response.Content.ReadAsAsync <List <Predmet_Report_Result> >().Result;
                Predmet_Report_ResultBindingSource.DataSource = list;


                BindGrad();
            }
        }
コード例 #9
0
ファイル: PregledProdajeForm.cs プロジェクト: demija/My_Pizza
        private void BindSveNarudzbe()
        {
            HttpResponseMessage response = narudzbeService.GetActionResponse("GetAllNarudzbe");

            if (response.IsSuccessStatusCode)
            {
                rezultatDataGridView.AutoGenerateColumns = false;
                rezultatDataGridView.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;

                sveNarudzbe = response.Content.ReadAsAsync <List <myPizza_Narudzbe_SelectAll_Result> >().Result;

                if (Convert.ToInt32(korisniciComboBox.SelectedValue) != 0)
                {
                    List <myPizza_Narudzbe_SelectAll_Result> temp = new List <myPizza_Narudzbe_SelectAll_Result>();

                    foreach (var item in sveNarudzbe)
                    {
                        if (item.KorisnikId == Convert.ToInt32(korisniciComboBox.SelectedValue))
                        {
                            temp.Add(item);
                        }
                    }

                    rezultatDataGridView.DataSource = temp;
                    ukupnoLabel.Text = "Ukupno: " + temp.Count.ToString();
                }
                else
                {
                    rezultatDataGridView.DataSource = sveNarudzbe;
                    ukupnoLabel.Text = "Ukupno: " + sveNarudzbe.Count.ToString();
                }
            }
        }
コード例 #10
0
        private void PrikaziOdgovore(int PitanjeId)
        {
            HttpResponseMessage response          = odgovoriService.GetActionResponse("GetOdgovoriByPitanjeId", PitanjeId);
            HttpResponseMessage response_oznaceni = oznaceniOdgovoriService.GetActionResponse("GetOznaceniOdgovoriByPitanjeId", polaze.PolazeId + "/" + PitanjeId);

            if (response.IsSuccessStatusCode)
            {
                var jsonResult = response.Content.ReadAsStringAsync();
                listaOdgovora = JsonConvert.DeserializeObject <List <Odgovor> >(jsonResult.Result);

                var jsonResult_oznaceni = response_oznaceni.Content.ReadAsStringAsync();
                List <OznaceniOdgovori> listaOznacenihOdgovora = JsonConvert.DeserializeObject <List <OznaceniOdgovori> >(jsonResult_oznaceni.Result);



                foreach (var oznaceniOdg in listaOznacenihOdgovora)
                {
                    for (int i = 0; i < listaOdgovora.Count; i++)
                    {
                        if (oznaceniOdg.OdgovorId == listaOdgovora[i].OdgovorId)
                        {
                            listaOdgovora[i].Oznacen = true;
                            break;
                        }
                    }
                }


                odgovoriList.ItemsSource = listaOdgovora;
            }
            ;
        }
コード例 #11
0
 public async Task <IPagedList <Ucionica_SelectNonActive_Result> > GetPagedListAsync(int pageNummber = 1, int pageSize = 10)
 {
     return(await Task.Factory.StartNew(() =>
     {
         var response = tutorService.GetActionResponse("NonActiveUcionica", tutorID.ToString() + "/" + searchInput.Text);
         return response.Content.ReadAsAsync <List <Ucionica_SelectNonActive_Result> >().Result.ToPagedList(pageNummber, pageSize);
     }));
 }
コード例 #12
0
        public CasZahtjeviForm()
        {
            InitializeComponent();

            var response = terminService.GetActionResponse("DeleteTermine", TutorId.ToString());

            BindNeprocitano();
            BindTermine();
        }
コード例 #13
0
        private void UpisiOcjenu(int id)
        {
            var response = ocjenaTutorService.GetActionResponse("OcjenaAvg", id.ToString());

            if (response.IsSuccessStatusCode)
            {
                var ocjenaAvg = response.Content.ReadAsAsync <double>().Result;
                ocjenaInput.Text = ocjenaAvg.ToString();
            }
        }
コード例 #14
0
ファイル: UcioniceForm.cs プロジェクト: cajacaja/TutorApp
        //Prva page lista
        public async Task <IPagedList <Ucionica_SelectActive_Result> > GetPagedListActiveAsync(int pageNummber = 1, int pageSize = 10)
        {
            string parametar = OblastCmb.SelectedValue.ToString() + '/' + GradCmb.SelectedValue.ToString();


            return(await Task.Factory.StartNew(() => {
                HttpResponseMessage response = ucionicaService.GetActionResponse("AktivneUcionice", parametar);
                return response.Content.ReadAsAsync <List <Ucionica_SelectActive_Result> >().Result.ToPagedList(pageNummber, pageSize);
            }));
        }
コード例 #15
0
ファイル: UcionicaDetails.cs プロジェクト: cajacaja/TutorApp
        private void BindUcenici(int ucionicaId)
        {
            var response = ucionicaService.GetActionResponse("StudentiUcionice", ucionicaId.ToString());

            if (response.IsSuccessStatusCode)
            {
                var lstUcecnika = response.Content.ReadAsAsync <List <Ucionica_SelectUcenici_Result> >().Result;
                uceniciGridView.DataSource = lstUcecnika;
                uceniciGridView.ClearSelection();
            }
        }
コード例 #16
0
        private void BindUcionice(int id)
        {
            HttpResponseMessage response = studentService.GetActionResponse("PohadjaneUcionice", id.ToString());

            if (response.IsSuccessStatusCode)
            {
                var lstUcionice = response.Content.ReadAsAsync <List <Student_SelectUcionice_Result> >().Result;
                UcionicaGridView.DataSource = lstUcionice;
                UcionicaGridView.ClearSelection();
            }
        }
コード例 #17
0
        private void BindGrid()
        {
            HttpResponseMessage response = proizvodiService.GetActionResponse("ProizvodiByModel", ModelZadni.ToString());


            if (response.IsSuccessStatusCode)
            {
                proizvodi             = response.Content.ReadAsAsync <List <usp_ProizvodiByModel_Result> >().Result;
                stavkeGrid.DataSource = proizvodi;
            }
        }
コード例 #18
0
        private void BindNarudzbeDetails(string v)
        {
            HttpResponseMessage response = narudzbeService.GetActionResponse("GetNarudzbeDetails", v);

            if (response.IsSuccessStatusCode)
            {
                narudzbaDetailsDataGridView.AutoGenerateColumns = false;
                narudzbaDetailsDataGridView.DataSource          = response.Content.ReadAsAsync <List <myPizza_Narudzbe_Details_Result> >().Result;
                narudzbaDetailsDataGridView.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
            }
        }
コード例 #19
0
ファイル: ReportForm.cs プロジェクト: EldaSultic/DiplomskiRad
        private void LoadReport()
        {
            int testId     = Convert.ToInt32(testoviList.SelectedValue);
            int kandidatId = Convert.ToInt32(kandidatList.SelectedValue);

            if (testId == 0 && kandidatId == 0)
            {
                this.reportViewer1.LocalReport.DataSources.Clear();

                HttpResponseMessage response = rezultatService.GetActionResponse("GetReport", odDtp.Value.ToString("yyyy-MM-dd") + "/" + DoDtp.Value.ToString("yyyy-MM-dd") + "/NULL" + "/NULL");

                List <asp_report_Result> rezultati = response.Content.ReadAsAsync <List <asp_report_Result> >().Result;

                ReportDataSource rds = new ReportDataSource("RezultatiTestova", rezultati);
                this.reportViewer1.LocalReport.DataSources.Add(rds);

                this.reportViewer1.RefreshReport();
            }
            else if (testId != 0 && kandidatId == 0)
            {
                this.reportViewer1.LocalReport.DataSources.Clear();
                string testID = testId.ToString();
                HttpResponseMessage response = rezultatService.GetActionResponse("GetReport", odDtp.Value.ToString("yyyy-MM-dd") + "/" + DoDtp.Value.ToString("yyyy-MM-dd") + "/" + testID + "/NULL");

                List <asp_report_Result> rezultati = response.Content.ReadAsAsync <List <asp_report_Result> >().Result;

                ReportDataSource rds = new ReportDataSource("RezultatiTestova", rezultati);
                this.reportViewer1.LocalReport.DataSources.Add(rds);

                this.reportViewer1.RefreshReport();
            }
            else if (kandidatId != 0 && testId == 0)
            {
                this.reportViewer1.LocalReport.DataSources.Clear();
                string kandidatID = kandidatId.ToString();
                string testID     = testId.ToString();
                HttpResponseMessage      response  = rezultatService.GetActionResponse("GetReport", odDtp.Value.ToString("yyyy-MM-dd") + "/" + DoDtp.Value.ToString("yyyy-MM-dd") + "/NULL" + "/" + kandidatID);
                List <asp_report_Result> rezultati = response.Content.ReadAsAsync <List <asp_report_Result> >().Result;
                ReportDataSource         rds       = new ReportDataSource("RezultatiTestova", rezultati);
                this.reportViewer1.LocalReport.DataSources.Add(rds);
                this.reportViewer1.RefreshReport();
            }
            else
            {
                this.reportViewer1.LocalReport.DataSources.Clear();
                string kandidatID = kandidatId.ToString();
                string testID     = testId.ToString();
                HttpResponseMessage      response  = rezultatService.GetActionResponse("GetReport", odDtp.Value.ToString("yyyy-MM-dd") + "/" + DoDtp.Value.ToString("yyyy-MM-dd") + "/" + testID + "/" + kandidatID);
                List <asp_report_Result> rezultati = response.Content.ReadAsAsync <List <asp_report_Result> >().Result;
                ReportDataSource         rds       = new ReportDataSource("RezultatiTestova", rezultati);
                this.reportViewer1.LocalReport.DataSources.Add(rds);
                this.reportViewer1.RefreshReport();
            }
        }
コード例 #20
0
        private void BindNarudzbe()
        {
            HttpResponseMessage response = narudzbeServis.GetActionResponse("SelectNarudzbe");

            if (response.IsSuccessStatusCode)
            {
                dgNarudzbe.AutoGenerateColumns = false;
                narudzbe = response.Content.ReadAsAsync <List <usp_SelectNarudzbeDesk_Result> >().Result;
                dgNarudzbe.DataSource = narudzbe;
            }
        }
コード例 #21
0
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.
        /// This parameter is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            HttpResponseMessage response = narudzbeServis.GetActionResponse("GetListaNarudzbi", Global.prijavljeniKupac.KupacID.ToString());


            if (response.IsSuccessStatusCode)
            {
                narudzbeKorisnikaList.ItemsSource = response.Content.ReadAsAsync <List <Narudzbe> >().Result;
            }

            BindNarudzbe();
        }
コード例 #22
0
        private void BindFavourite()
        {
            HttpResponseMessage response  = favouriteServis.GetActionResponse("FavouriteByKupac1", Global.prijavljeniKupac.KupacID.ToString());
            HttpResponseMessage responseF = favouriteServis.GetActionResponse("FavouriteByKupac", Global.prijavljeniKupac.KupacID.ToString());
            int favouriteID = 0;

            if (response.IsSuccessStatusCode)
            {
                if (responseF.IsSuccessStatusCode)
                {
                    if (responseF.Content.ReadAsAsync <List <Favourite> >().Result.Count > 0)
                    {
                        favouriteID = response.Content.ReadAsAsync <Favourite>().Result.FavouriteID;
                        favID       = favouriteID;
                    }
                }



                // HttpResponseMessage response2 = favouriteProizvodServis.GetActionResponse("GetCount", favouriteID.ToString());
                //if (response2.Content.ReadAsAsync<int>().Result > 0)
                //{
                if (favouriteID != 0)
                {
                    HttpResponseMessage response1 = favouriteProizvodServis.GetActionResponse("ProizvodiIzFavourite", favouriteID.ToString());
                    proizvodi = response1.Content.ReadAsAsync <List <Proizvodi> >().Result;
                    if (response1.IsSuccessStatusCode)
                    {
                        if (proizvodi.Count() == 0)
                        {
                            cijenaList.Visibility       = Visibility.Collapsed;
                            korpaPraznaLabel.Visibility = Visibility.Visible;
                            favouriteList.Visibility    = Visibility.Collapsed;
                        }
                        else
                        {
                            favouriteList.ItemsSource   = proizvodi;
                            korpaPraznaLabel.Visibility = Visibility.Collapsed;
                            favouriteList.Visibility    = Visibility.Visible;
                        }
                    }
                }
                else
                {
                    cijenaList.Visibility       = Visibility.Collapsed;
                    korpaPraznaLabel.Visibility = Visibility.Visible;
                    favouriteList.Visibility    = Visibility.Collapsed;
                }
            }
        }
コード例 #23
0
        private void BindKandidatiList()
        {
            HttpResponseMessage response = kandidatiService.GetActionResponse("GetNepolozeniKandidati");

            if (response.IsSuccessStatusCode)
            {
                List <asp_Podaci_Za_KNN_Result> kandidati = response.Content.ReadAsAsync <List <asp_Podaci_Za_KNN_Result> >().Result;
                kandidati.Insert(0, new asp_Podaci_Za_KNN_Result());
                kandidatList.DataSource    = kandidati;
                kandidatList.DisplayMember = "ImePrezime";

                kandidatList.ValueMember = "KandidatId";
            }
        }
コード例 #24
0
        public TestoviPage(string naziv)
        {
            InitializeComponent();

            HttpResponseMessage response = testoviService.GetActionResponse("GetTestoviByIzbor", naziv);

            if (response.IsSuccessStatusCode)
            {
                var         jsonResult = response.Content.ReadAsStringAsync();
                List <Test> lista      = JsonConvert.DeserializeObject <List <Test> >(jsonResult.Result);

                testoviList.ItemsSource = lista;
            }
        }
コード例 #25
0
        private void bindForm()
        {
            HttpResponseMessage response = testService.GetActionResponse("GetTestByName", pretragaInput.Text);

            if (response.IsSuccessStatusCode)
            {
                List <asp_Test_Select_All_Result> testovi = response.Content.ReadAsAsync <List <asp_Test_Select_All_Result> >().Result;
                testGridView.DataSource = testovi;
            }
            else
            {
                MessageBox.Show("Error code: " + response.StatusCode + " Message:" + response.ReasonPhrase);
            }
        }
コード例 #26
0
        public DodajObavijestForm()
        {
            InitializeComponent();
            this.AutoValidate = AutoValidate.Disable;

            HttpResponseMessage response = _predmetiService.GetActionResponse("getPredmetiByNastavnik", Global.TrenutniKorisnik.KorisnikId.ToString());

            if (response.IsSuccessStatusCode)
            {
                predmetiInput.DataSource    = response.Content.ReadAsAsync <List <PredmetVM> >().Result;
                predmetiInput.ValueMember   = "PredmetId";
                predmetiInput.DisplayMember = "Naziv";
            }
        }
コード例 #27
0
        private void bindKandidati1()
        {
            HttpResponseMessage response = kandidatiService.GetActionResponse("GetKandidatImePrezime");

            if (response.IsSuccessStatusCode)
            {
                List <asp_Kandidati_SpojenoImePrezime_Result> kandidati = response.Content.ReadAsAsync <List <asp_Kandidati_SpojenoImePrezime_Result> >().Result;
                kandidati.Insert(0, kandidati.Where(x => x.KandidatId == KandidatId).SingleOrDefault());
                kandidatiList.DataSource    = kandidati;
                kandidatiList.DisplayMember = "ImePrezime";
                kandidatiList.ValueMember   = "KandidatId";
                kandidatiList.Enabled       = false;
            }
        }
コード例 #28
0
        private void Fill()
        {
            HttpResponseMessage response = upitiService.GetActionResponse("GetDetalji", upitID.ToString());

            if (response.IsSuccessStatusCode)
            {
                var jsonObject           = response.Content.ReadAsStringAsync();
                DetaljiUpita_Result upit = JsonConvert.DeserializeObject <DetaljiUpita_Result>(jsonObject.Result);

                upitIDLbl.Text     = "Detalji o upitu ID: " + upit.UpitID.ToString();
                DatumLbl.Text      = upit.Datum_upita.GetValueOrDefault().ToString("dd.MM.yyyy");
                zeljeniOdLbl.Text  = upit.ZeljeniDatumPrijemaOd.GetValueOrDefault().ToString("dd.MM.yyyy");
                zeljeniDoLbl.Text  = upit.ZeljeniDatumPrijemaDo.GetValueOrDefault().ToString("dd.MM.yyyy");
                markaLBl.Text      = upit.Marka_uredjaja;
                modelLbl.Text      = upit.Model_uredjaja;
                KategorijaLbl.Text = upit.Naziv_kategorije;
                OpisLbl.Text       = upit.Opis_kvara;

                HttpResponseMessage response2 = upitiService.GetActionResponse("GetKompanijeByUpitId", upitID.ToString());
                if (response2.IsSuccessStatusCode)
                {
                    var jsonObject2 = response2.Content.ReadAsStringAsync();
                    List <KompanijeUpitResult> kompanije = JsonConvert.DeserializeObject <List <KompanijeUpitResult> >(jsonObject2.Result);

                    string kompanijeString = "";
                    for (int x = 0; x < kompanije.Count() - 1; x++)
                    {
                        kompanijeString += kompanije[x].Naziv + ",";
                    }
                    kompanijeString += kompanije[kompanije.Count() - 1].Naziv;

                    KompanijeListLbl.Text = kompanijeString;
                }



                ;                if (upit.Slika != null)
                {
                    Stream stream = new MemoryStream(upit.Slika);

                    slika.Source = ImageSource.FromStream(() => stream);
                }
                else
                {
                    slikaPct.IsVisible = false;
                    slika.IsVisible    = false;
                }
            }
        }
コード例 #29
0
        private void traziTerminBtn_Click(object sender, EventArgs e)
        {
            HttpResponseMessage response = terminiService.GetActionResponse("SearchByDate", datumTerminaDateTimePicker.Value.ToUniversalTime().ToString("dd-MM-yyyy"));

            if (response.IsSuccessStatusCode)
            {
                List <Termini_Result> termini = response.Content.ReadAsAsync <List <Termini_Result> >().Result;
                TerminiGridView.DataSource = termini;
                TerminiGridView.ClearSelection();
            }
            else
            {
                MessageBox.Show("Error Code" + response.StatusCode + " : Message - " + response.ReasonPhrase);
            }
        }
コード例 #30
0
        void BindForm()
        {
            HttpResponseMessage response = pitanjeService.GetActionResponse("SearchByName", PitanjeInput.Text.Trim());

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