Exemplo n.º 1
0
        private void btnIzmijeniDodjelu_Click(object sender, EventArgs e)
        {
            frmDodajArsenal novaDodjela = new frmDodajArsenal((int)dgvArsenal.CurrentRow.Cells[0].Value, (int)dgvArsenal.CurrentRow.Cells[1].Value);

            novaDodjela.ShowDialog();
            RadSArsenalom.PrikaziPodatke(filter, dgvArsenal, cmbFilter);
        }
Exemplo n.º 2
0
        private void btnDodajDodjelu_Click(object sender, EventArgs e)
        {
            frmDodajArsenal novaDodjela = new frmDodajArsenal();

            novaDodjela.ShowDialog();
            RadSArsenalom.PrikaziPodatke(filter, dgvArsenal, cmbFilter);
        }
Exemplo n.º 3
0
        private void frmArsenal_Load(object sender, EventArgs e)
        {
            RadSArsenalom.PopuniPostrojbama(cmbFilter);
            rdbPostrojba.Checked = true;

            RadSArsenalom.PrikaziPoPostrojbama(dgvArsenal, (int)cmbFilter.SelectedValue);
        }
Exemplo n.º 4
0
        private void frmDodajArsenal_Load(object sender, EventArgs e)
        {
            RadSArsenalom.PopuniPostrojbama(cmbPostrojba);
            RadSArsenalom.PopuniOpremom(cmbOprema);

            if (id_oprema == 0 && id_oprema == 0)
            {
                this.Text = "Dodjela opreme";
            }
            else
            {
                this.Text = "Izmjena dodjele";

                foreach (var item in cmbPostrojba.Items)
                {
                    if ((item as Stavka).id_postrojbe == id_postrojba)
                    {
                        cmbPostrojba.SelectedItem = item;
                    }
                }

                foreach (var item in cmbOprema.Items)
                {
                    if ((item as oprema).id_oprema == id_oprema)
                    {
                        cmbOprema.SelectedItem = item;
                    }
                }
            }
        }
Exemplo n.º 5
0
 private void btnIzbrisiDodjelu_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show("Jeste li sigurni da želite obrisati dio ovog arsenala?", "Upozorenje!", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
     {
         RadSArsenalom.ObrisiArsenal((int)dgvArsenal.CurrentRow.Cells[0].Value, (int)dgvArsenal.CurrentRow.Cells[1].Value);
         MessageBox.Show("Uspješno ste uklonili zapis.", "Uspjeh", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     RadSArsenalom.PrikaziPodatke(filter, dgvArsenal, cmbFilter);
 }
Exemplo n.º 6
0
 private void rdbPostrojba_CheckedChanged(object sender, EventArgs e)
 {
     if (rdbPostrojba.Checked == true)
     {
         filter = 1;
         RadSArsenalom.PopuniPostrojbama(cmbFilter);
     }
     else
     {
         filter = 2;
         RadSArsenalom.PopuniOpremom(cmbFilter);
     }
 }
Exemplo n.º 7
0
        private void btnSpremi_Click(object sender, EventArgs e)
        {
            var itemPostrojba = cmbPostrojba.SelectedItem as Stavka;
            var itemOprema    = cmbOprema.SelectedItem as oprema;

            if (id_oprema == 0 && id_oprema == 0)
            {
                if (RadSArsenalom.DodajArsenal(itemPostrojba.id_postrojbe, itemOprema.id_oprema))
                {
                    MessageBox.Show("Uspješno ste dodali postrojbu.", "Uspjeh", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.Close();
                }
            }
            else
            {
                RadSArsenalom.IzmjeniArsenal(id_postrojba, id_oprema, itemPostrojba.id_postrojbe, itemOprema.id_oprema);
            }
        }
Exemplo n.º 8
0
 private void cmbFilter_SelectedValueChanged(object sender, EventArgs e)
 {
     RadSArsenalom.PrikaziPodatke(filter, dgvArsenal, cmbFilter);
 }