示例#1
0
        private void PopulateInfos()
        {
            listView_dreseri.Items.Clear();
            lista_dresera = DTOManager.Učitaj_informacije_svih_artista();
            //lista_tačaka_checked = DTOManager.Učitaj_informacije_svih_tačaka();
            foreach (ArtistiPregled a in lista_dresera)
            {
                ListViewItem item = new ListViewItem(new string[] {  });

                listView_dreseri.Items.Add(item);
            }
            listView_dreseri.Refresh();
        }
示例#2
0
 private void btnIzmeni_Click(object sender, EventArgs e)
 {
     if (DTOManager.UpdateOprema(this.o_parent.idSelektovane_Opreme, txtOprema.Text))
     {
         this.o_parent.idSelektovane_Opreme = -1;
         txtOprema.Text = "";
         this.o_parent.UcitajOpreme();
     }
     else
     {
         MessageBox.Show("Neuspesno");
     }
 }
示例#3
0
        private void PopulateInfos()
        {
            listViewGeografski.Items.Clear();
            List <PovrsinskiObjekatBasic> pobList = DTOManager.GetSvePovrsinskeObjekteBasic();

            foreach (PovrsinskiObjekatBasic po in pobList)
            {
                ListViewItem item = new ListViewItem(new string[] { po.Id.ToString(), po.Naziv });

                listViewGeografski.Items.Add(item);
            }
            listViewGeografski.Refresh();
        }
示例#4
0
        private void PopulateInfos()
        {
            listViewGeografski.Items.Clear();
            List <VodnaPovrsinaBasic> vpbList = DTOManager.GetSveVodnePovrsine();

            foreach (VodnaPovrsinaBasic vpb in vpbList)
            {
                ListViewItem item = new ListViewItem(new string[] { vpb.Id.ToString(), vpb.Naziv, vpb.Tip_Vode });

                listViewGeografski.Items.Add(item);
            }
            listViewGeografski.Refresh();
        }
示例#5
0
文件: Grad.cs 项目: marija-sta/cirkus
        private void PopulateInfos()
        {
            listView_gradova.Items.Clear();
            lista_gradova = DTOManager.Učitaj_informacije_svih_gradova();

            foreach (GradPregled gp in lista_gradova)
            {
                ListViewItem item = new ListViewItem(new string[] { gp.poštanski_broj.ToString(), gp.naziv, gp.zemlja, gp.opis });

                listView_gradova.Items.Add(item);
            }
            listView_gradova.Refresh();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            radnik.Ime           = txbIme.Text;
            radnik.SrednjeSlovo  = Char.Parse(txbSrednjeSlovo.Text);
            radnik.Prezime       = txbPrezime.Text;
            radnik.StrucnaSpema  = txbStrucnaSprema.Text;
            radnik.DatumRodjenja = datumRodjenja.Value;
            //radnik.Sef = false;


            DTOManager.azurirajRadnika(radnik);
            this.Close();
        }
        private void btnIznajmi_Click(object sender, EventArgs e)
        {
            if (txtStanarina.Text == "" || txtIDmusterije.Text == "" || txtIDProdavca.Text == "" || txtIDZaposlenog.Text == "")
            {
                MessageBox.Show("Popunite sva polja");
                return;
            }
            if (tipNekretnine)
            {
                string s = DTOManager.IznajmiStambenuNekretninu(parent.id_selektovanaStambena, int.Parse(txtStanarina.Text), dateTimepocetak.Value, dateTimekraj.Value, int.Parse(txtIDmusterije.Text), int.Parse(txtIDProdavca.Text), int.Parse(txtIDZaposlenog.Text));

                if (s.Equals("uspesno"))
                {
                    MessageBox.Show("Uspesno ste iznajmili");
                }
                else
                {
                    MessageBox.Show(s);
                }
                this.parent.id_selektovanaStambena = -1;
                txtStanarina.Text     = "";
                dateTimepocetak.Value = System.DateTime.Now;
                dateTimekraj.Value    = System.DateTime.Now;
                txtIDmusterije.Text   = "";
                txtIDProdavca.Text    = "";
                txtIDZaposlenog.Text  = "";
                this.Close();
            }
            else
            {
                string s = DTOManager.IznajmiPoslovnuNekretninu(parent.id_selektovanaStambena, int.Parse(txtStanarina.Text), dateTimepocetak.Value, dateTimekraj.Value, int.Parse(txtIDmusterije.Text), int.Parse(txtIDProdavca.Text), int.Parse(txtIDZaposlenog.Text));

                if (s.Equals("uspesno"))
                {
                    MessageBox.Show("Uspesno ste iznajmili");
                }
                else
                {
                    MessageBox.Show(s);
                }
                this.parent.id_selektovanaPoslovna = 1;
                txtStanarina.Text     = "";
                dateTimepocetak.Value = System.DateTime.Now;
                dateTimekraj.Value    = System.DateTime.Now;
                txtIDmusterije.Text   = "";
                txtIDProdavca.Text    = "";
                txtIDZaposlenog.Text  = "";
                this.Close();
            }
        }
示例#8
0
        private void btnObrisi_Click(object sender, EventArgs e)
        {
            if (listViewGeografski.SelectedItems.Count == 0)
            {
                return;
            }

            int id = Int32.Parse(listViewGeografski.SelectedItems[0].SubItems[0].Text);


            DTOManager.DeletePovrsinskiObjekatBasic(id);

            this.PopulateInfos();
        }
        private void btnSacuvajIzmene_Click(object sender, EventArgs e)
        {
            //setuj parent.id_selektovanog=-1 :D
            int idp = int.Parse(txtPoslovnica.Text);

            if (DTOManager.IzmeneNovoKvart(id, txtGradskaZona.Text, idp) == -1)
            {
                MessageBox.Show("Ne postoji trazena poslovnica");
                return;//imas sansu samo  to da izmenis :D
            }
            parent.id_selektovanog = -1;
            parent.UcitajKvartove();
            this.Close();
        }
示例#10
0
 private void btnObrisiPoslovnu_Click(object sender, EventArgs e)
 {
     if (listViewSvePoslovne.SelectedItems.Count == 0)
     {
         MessageBox.Show("Odaberite nekretninu");
         return;
     }
     this.id_selektovanaPoslovna = Int32.Parse(listViewSvePoslovne.SelectedItems[0].SubItems[0].Text);
     if (this.ObrisiSelektovano() == System.Windows.Forms.DialogResult.Yes)
     {
         DTOManager.ObrisiPoslovnuNekretninu(id_selektovanaPoslovna);
         this.UcitajSvePoslovne();
     }
 }
示例#11
0
        private void btnIzmeniOdeljenje_Click(object sender, EventArgs e)
        {
            if (odeljenja.SelectedItems.Count == 0)
            {
                MessageBox.Show("Izaberite odeljenje cije podatke zelite da izmenite!");
                return;
            }

            int idOdeljenja = Int32.Parse(odeljenja.SelectedItems[0].SubItems[0].Text);
            OdeljenjeDo5Basic       odeljenje = DTOManager.vratiOdeljenjaDo5(idOdeljenja);
            IzmeniOdeljenjeDo5Forma forma     = new IzmeniOdeljenjeDo5Forma(odeljenje);

            forma.ShowDialog();
            popuniPodacima();
        }
        private void btnObrisi_Click(object sender, EventArgs e)
        {
            int odId = Int32.Parse(listViewGeografski.SelectedItems[0].SubItems[0].Text);
            LinijskiObjekatBasic g = DTOManager.vratiLinijskiObjekat(odId);

            if (DialogResult.Yes == MessageBox.Show("Da li ste sigurni da zelite da obrisete?", "Pitanje",
                                                    MessageBoxButtons.YesNo, MessageBoxIcon.Question))
            {
                DTOManager.obrisiLinijski(g);
                popuniListu();

                MessageBox.Show("Operacija brisanja uspesno izvrsena!", "Obavestenje",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
示例#13
0
 private void button1_Click(object sender, EventArgs e)
 {
     radi.DatumOd = datumOd.Value;
     if (chbDatumDo.Checked == true)
     {
         radi.DatumDo = null;
     }
     else
     {
         radi.DatumDo = (DateTime?)DatumDo.Value;
     }
     DTOManager.izmeniRadniOdnos(radi);
     MessageBox.Show("Uspesno ste izmenili podatke o radnom odnosu!");
     this.Close();
 }
        private void btnObrisiOpremu_Click(object sender, EventArgs e)
        {
            if (listViewOpreme.SelectedItems.Count == 0)
            {
                MessageBox.Show("Odaberite opremu");
                return;
            }
            idSelektovane_Opreme = Int32.Parse(listViewOpreme.SelectedItems[0].SubItems[0].Text);

            if (ObrisiSelektovano() == System.Windows.Forms.DialogResult.Yes)
            {
                DTOManager.ObrisiOpremu(idSelektovane_Opreme);
                this.UcitajOpreme();
            }
        }
        public void popuniPodacima()
        {
            odeljenja.Items.Clear();
            List <OdeljenjeOd6Do15Pregled> podaci = DTOManager.vratiOdeljenjaOd6Do15Prodavnice(prodavnica.Id);

            foreach (OdeljenjeOd6Do15Pregled p in podaci)
            {
                ListViewItem item = new ListViewItem(new string[] { p.OdeljenjeId.ToString(), p.Lokacija, p.BrojKasa.ToString(), p.InfoPult });
                odeljenja.Items.Add(item);
            }



            odeljenja.Refresh();
        }
示例#16
0
        private void btnPregledIgracaka_Click(object sender, EventArgs e)
        {
            if (odeljenja.SelectedItems.Count == 0)
            {
                MessageBox.Show("Izaberite odeljenje cije proizvode zelite da vidite!");
                return;
            }

            int idOdeljenja                        = Int32.Parse(odeljenja.SelectedItems[0].SubItems[0].Text);
            OdeljenjeDo5Basic odeljenje            = DTOManager.vratiOdeljenjaDo5(idOdeljenja);
            PregledProizvodaOdeljenjaDo5Form forma = new PregledProizvodaOdeljenjaDo5Form(odeljenje);

            forma.ShowDialog();
            popuniPodacima();
        }
 private void button1_Click_1(object sender, EventArgs e)
 {
     odeljenje.Lokacija = txbLokacija.Text;
     odeljenje.BrojKasa = (int)brojKasa.Value;
     if (chbPult.Checked == true)
     {
         odeljenje.infoPult = "Da";
     }
     else
     {
         odeljenje.infoPult = "Ne";
     }
     DTOManager.izmeniOdeljenjeOd6Do15(odeljenje);
     MessageBox.Show("Uspesno ste izmenili odeljenje!");
     this.Close();
 }
示例#18
0
 private void PrikaziSveLinijske()
 {
     foreach (var lin in DTOManager.GetSveLinijskeObjekteBasic())
     {
         try
         {
             ListViewItem item = new ListViewItem(new string[] { lin.Id.ToString(), lin.Naziv, lin.Duzina, lin.Tip_Objekta, lin.Opis_Objekta });
             listViewSviLinijskiObjekti.Items.Add(item);
         }
         catch (Exception e)
         {
             MessageBox.Show(e.Message);
         }
     }
     listViewSviLinijskiObjekti.Refresh();
 }
示例#19
0
        private void btnIzmeniZaposlenog_Click(object sender, EventArgs e)
        {
            if (zaposleni.SelectedItems.Count == 0)
            {
                MessageBox.Show("Izaberite zaposlenog koga zelite da izmenite!");
                return;
            }

            int                   idZaposleni = Int32.Parse(zaposleni.SelectedItems[0].SubItems[0].Text);
            RadnikBasic           r           = DTOManager.vratiRadnika(idZaposleni);
            IzmeniZaposlenogForma forma       = new IzmeniZaposlenogForma(r);

            forma.ShowDialog();
            MessageBox.Show("Uspesno ste izmenili podatke o zaposlenom!");
            popuniPodacima();
        }
示例#20
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (zaposleni.SelectedItems.Count == 0)
            {
                MessageBox.Show("Izaberite zaposlenog cije podatke o radnom odnosu zelite da izmenite!");
                return;
            }

            int idZaposleni             = Int32.Parse(zaposleni.SelectedItems[0].SubItems[0].Text);
            int idProdavnice            = prodavnica.Id;
            List <RadiUBasic>     rad   = DTOManager.vratiRadniOdnos(idZaposleni, idProdavnice);
            RadiUBasic            r     = rad.First();
            IzmeniRadniOdnosForma forma = new IzmeniRadniOdnosForma(r);

            forma.ShowDialog();
        }
示例#21
0
        private void Btn_sačuvaj_Click(object sender, EventArgs e)
        {
            try
            {
                if (!Validacija())
                {
                    return;
                }

                PomoćnoOsobljePregled osoblje = new PomoćnoOsobljePregled();
                osoblje.matični_broj  = long.Parse(lbl_matični_broj.Text);
                osoblje.ime           = tbx_ime.Text;
                osoblje.prezime       = tbx_prezime.Text;
                osoblje.pol           = GetFirstChar(cbx_pol.Text.ToString());
                osoblje.datum_rođenja = dtp_datum_rođenja.Value;
                osoblje.mesto_rođenja = tbx_mesto_rođenja.Text;

                try
                {
                    if (DTOManager.Izmeni_pomoćno_osoblje(osoblje))
                    {
                        DialogResult dialog = MessageBox.Show("Uspešno su ažurirani podaci o pomoćnom osoblju!");
                        if (dialog == DialogResult.OK)
                        {
                            this.Close();
                        }
                    }
                    else
                    {
                        DialogResult dialog = MessageBox.Show("Došlo je do problema sa ažuriranjem podataka.");
                        if (dialog == DialogResult.OK)
                        {
                            this.Close();
                        }
                    }
                }

                catch (Exception ec)
                {
                    MessageBox.Show(ec.Message);
                }
            }
            catch (Exception ec)
            {
                MessageBox.Show(ec.Message);
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            RadiUBasic radi = new RadiUBasic();

            radnik  = (RadnikBasic)zaposleni.SelectedItem;
            radi.Id = new RadiUIdBasic();
            radi.Id.RadiUProdavnica = prodavnica;
            radi.Id.RadnikRadiU     = radnik;
            radi.DatumOd            = datumOd.Value;
            if (chbDatumDo.Checked == false)
            {
                radi.DatumDo = DatumDo.Value;
            }
            DTOManager.dodajRadniOdnos(radi);
            MessageBox.Show("Uspesno ste dodali novi radni odnos!");
            this.Close();
        }
示例#23
0
        private void btnPrikazi_Click(object sender, EventArgs e)
        {
            if (listViewGeografski.SelectedItems.Count == 0)
            {
                return;
            }

            int id = Int32.Parse(listViewGeografski.SelectedItems[0].SubItems[0].Text);
            VodnaPovrsinaBasic vpb = DTOManager.GetVodnaPovrsinaBasic(id);

            MFormDodajAzurirajVodnaPovrsina f = new MFormDodajAzurirajVodnaPovrsina();

            f.Tip   = 2;
            f.Vodna = vpb;

            f.Show();
        }
        public void PopuniListView()
        {
            listViewGeografski.Items.Clear();
            List <GeografskiObjekatBasic> lista = DTOManager.VratiGeografskeObjekte();

            foreach (GeografskiObjekatBasic g in lista)
            {
                ListViewItem item = new ListViewItem(new string[]
                {
                    g.Id.ToString(),
                    g.Naziv,
                });

                listViewGeografski.Items.Add(item);
            }
            listViewGeografski.Refresh();
        }
示例#25
0
        private void Btn_sačuvaj_Click_1(object sender, EventArgs e)
        {
            try
            {
                if (!Validacija())
                {
                    return;
                }

                TačkaPregled tačka = new TačkaPregled();
                tačka.broj_tačke  = int.Parse(lbl_broj_tačke.Text);
                tačka.naziv_tačke = tbx_naziv_tačke.Text;
                tačka.tip         = cbx_tip.Text;
                tačka.efekti      = cbx_efekti.Text;
                tačka.uzrast      = tbx_uzrast.Text;

                try
                {
                    if (DTOManager.Izmeni_tačku(tačka))
                    {
                        DialogResult dialog = MessageBox.Show("Uspešno su ažurirani podaci o cirkuskoj tački!");
                        if (dialog == DialogResult.OK)
                        {
                            this.Close();
                        }
                    }
                    else
                    {
                        DialogResult dialog = MessageBox.Show("Došlo je do problema sa ažuriranjem podataka ");
                        if (dialog == DialogResult.OK)
                        {
                            this.Close();
                        }
                    }
                }

                catch (Exception ec)
                {
                    MessageBox.Show(ec.Message);
                }
            }
            catch (Exception ec)
            {
                MessageBox.Show(ec.Message);
            }
        }
示例#26
0
        private void btnPrikazi_Click(object sender, EventArgs e)
        {
            if (listViewGeografski.SelectedItems.Count == 0)
            {
                return;
            }
            int id = Int32.Parse(listViewGeografski.SelectedItems[0].SubItems[0].Text);
            PovrsinskiObjekatBasic po = DTOManager.GetPovrsinskiObjekatBasic(id);


            MFormDodajAzurirajPovrsinskiObjekti f = new MFormDodajAzurirajPovrsinskiObjekti();

            f.Tip        = 2;
            f.Povrsinski = po;

            f.Show();
        }
示例#27
0
        public void UcitajSvePoslovne()
        {
            listViewSvePoslovne.Items.Clear();
            List <NekretninaPoslovnaPregled> lista = DTOManager.UcitajPoslovne();

            foreach (NekretninaPoslovnaPregled n in lista)
            {
                string p = "Nema";
                if (n.Sala == "true")
                {
                    p = "Ima";
                }
                ListViewItem item = new ListViewItem(new string[] { n.ID.ToString(), n.Ulica, n.Broj.ToString(), n.Sprat.ToString(), n.Datum_izgradnje.ToString(), n.Cena.ToString(), n.Prodaja_Iznajmljivanje, p, n.ID_Kvarta.ToString(), n.ID_Prodavca.ToString(), n.Oprema });
                listViewSvePoslovne.Items.Add(item);
            }
            listViewSvePoslovne.Refresh();
        }
示例#28
0
        private void Btn_sačuvaj_Click_1(object sender, EventArgs e)
        {
            try
            {
                if (!Validacija())
                {
                    return;
                }
                GradPregled grad = new GradPregled();
                //grad.poštanski_broj = int.Parse(tbx_poštanski_broj.Text);
                grad.naziv          = tbx_naziv_grada.Text;
                grad.zemlja         = tbx_zemlja.Text;
                grad.opis           = tbx_opis.Text;
                grad.poštanski_broj = int.Parse(lbl_poštanski_broj.Text);

                try
                {
                    if (DTOManager.Izmeni_grad(grad))
                    {
                        DialogResult dialog = MessageBox.Show("Uspešno su ažurirani podaci o gradu!");
                        if (dialog == DialogResult.OK)
                        {
                            this.Close();
                        }
                    }
                    else
                    {
                        DialogResult dialog = MessageBox.Show("Došlo je do problema sa ažuriranjem podataka ");
                        if (dialog == DialogResult.OK)
                        {
                            this.Close();
                        }
                    }
                }

                catch (Exception ec)
                {
                    MessageBox.Show(ec.Message);
                }
            }
            catch (Exception ec)
            {
                MessageBox.Show(ec.Message);
            }
        }
        public void popuniListu()
        {
            listViewUzvisenja.Items.Clear();

            List <UzvisenjeBasic> lista = DTOManager.vratiSvaUzvisenja();

            foreach (UzvisenjeBasic u in lista)
            {
                ListViewItem item = new ListViewItem(new string[]
                {
                    u.id.ToString(),
                    u.naziv,
                    u.Nadmorska_visina.ToString(),
                });
                listViewUzvisenja.Items.Add(item);
            }
            listViewUzvisenja.Refresh();
        }
        private void Button4_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                MessageBox.Show("Odaberite sponzora!");
                return;
            }
            int          odId = Int32.Parse(listView1.SelectedItems[0].SubItems[0].Text);
            SponzorBasic sb   = DTOManager.GetSponzorBasic(odId);

            IzmeniSponzora sbForm = new IzmeniSponzora(sb);

            if (sbForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                DTOManager.UpdateSponzorBasic(sbForm.tBasic);
                populateInfos();
            }
        }