Пример #1
0
 public frmZadaciDetalji(int?zadaciId = null, frmZadaci frm1 = null)
 {
     InitializeComponent();
     _id  = zadaciId;
     frm2 = frm1;
     this.AutoValidate = AutoValidate.Disable;
 }
Пример #2
0
        private async void BtnSacuvaj_Click(object sender, EventArgs e)
        {
            bool zavrseno = false;

            if (radioButtonDA.Checked)
            {
                zavrseno = true;
            }
            else
            {
                zavrseno = false;
            }

            if (this.ValidateChildren())
            {
                var request = new ZadaciInsertRequest()
                {
                    ZaposleniciId = int.Parse(cbZaposlenik.SelectedValue.ToString()),
                    Naziv         = txtNaziv.Text,
                    Opis          = txtOpis.Text,

                    DatumPocetka = dtpDatumPocetka.Value,
                    Rok          = dtpRokZavrsetka.Value,
                    Zavrsen      = zavrseno,
                    IsDeleted    = false
                };

                if (_id.HasValue)
                {
                    await _aPIServiceZadaci.Update <Model.Zadaci>(_id, request);

                    MessageBox.Show(Properties.Resources.MessageBoxForSave);

                    this.Hide();
                    frm2.RefreshData();
                }
                else
                {
                    await _aPIServiceZadaci.Insert <Model.Zadaci>(request);

                    MessageBox.Show(Properties.Resources.MessageBoxForSave);
                    this.Hide();
                    frmZadaci frm = new frmZadaci();
                    frm.Show();
                }
            }
        }
Пример #3
0
 private void PretragaToolStripMenuItem5_Click(object sender, EventArgs e)
 {
     Zadaci.frmZadaci frm = new Zadaci.frmZadaci();
     frm.MdiParent = this;
     frm.Show();
 }