Esempio n. 1
0
        private void FillForm()
        {
            PonudaIDLbl.Text   = PonudaID.ToString();
            UpitIDLbl.Text     = p.UpitID.ToString();
            DatumLbl.Text      = p.DatumKreiranja.ToShortDateString();
            KlijentLbl.Text    = p.Klijent_ime_i_prezime;
            DaniLbl.Text       = (Convert.ToInt32(p.TrajanjeDani)).ToString();
            SatiLbl.Text       = p.TrajanjeSati.ToString();
            CijenaLbl.Text     = p.Cijena.ToString();
            OdgovorTxt.Text    = p.Odgovor;
            KategorijaLbl.Text = p.Naziv;
            UredjajTxt.Text    = p.Uredjaj;

            if (p.Prihvacena == true)
            {
                DaLbl.Text = "DA";
                NeLbl.Hide();
                servisBtn.Show();
            }
            else
            {
                DaLbl.Hide();
                NeLbl.Text = "NE";
                servisBtn.Hide();
            }
        }
Esempio n. 2
0
        private void servisBtn_Click(object sender, EventArgs e)
        {
            HttpResponseMessage response = ServisiService.GetActionResponse("GetServisByPonudaID", PonudaID.ToString());

            Servisi.DetaljiServisa frm = new Servisi.DetaljiServisa(response.Content.ReadAsAsync <int>().Result);
            frm.ShowDialog();
        }
Esempio n. 3
0
        private void DetaljiPonude_Load(object sender, EventArgs e)
        {
            HttpResponseMessage response = PonudeService.GetActionResponse("GetDetalji", PonudaID.ToString());

            if (response.IsSuccessStatusCode)
            {
                if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
                {
                    p = null;
                }
                else if (response.IsSuccessStatusCode)
                {
                    p = response.Content.ReadAsAsync <PonudaDetalji_Result>().Result;
                    FillForm();
                }
            }
        }