Example #1
0
 public TimPrikazForma(object o)
 {
     InitializeComponent();
     ButtonEdit = btnEdit;
     KontrolerKI.PrikaziDetaljeTima(o);
     PocetnaForma.ApplyDisabledStyle(btnEdit);
     this.Cursor = Cursors.WaitCursor;
 }
Example #2
0
        internal void PopunuFormu(string id, string naziv)
        {
            txtId.Text    = id;
            txtNaziv.Text = naziv;

            PocetnaForma.ApplyEnabledStyle(btnBack);
            PocetnaForma.ApplyEnabledStyle(btnEdit);
            this.Cursor = Cursors.Arrow;
        }
Example #3
0
 public void PrikaziRezultatePretrage(int count)
 {
     if (count > 0)
     {
         PocetnaForma.ApplyEnabledStyle(btnDetails);
         isBtnDetailsEnabled = true;
     }
     else
     {
         PocetnaForma.ApplyDisabledStyle(btnDetails);
         isBtnDetailsEnabled = false;
     }
 }
Example #4
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            string kriterijum = txtSearch.Text.Trim();

            if (String.IsNullOrWhiteSpace(kriterijum))
            {
                MessageBox.Show("Molimo unesite kriterijum pretrage!", "Neispravno polje");
                listSearchResults.DataSource = null;
                PocetnaForma.ApplyDisabledStyle(btnDetails);
                isBtnDetailsEnabled = false;
                return;
            }
            KontrolerKI.PretraziOsoblje(kriterijum);
            this.Cursor = Cursors.WaitCursor;
        }
Example #5
0
 public void SetEnableControls(bool state)
 {
     stateEnabled   = state;
     cbSale.Enabled = state;
     datePickerTerminOdDatum.Enabled = state;
     datePickerTerminDoDatum.Enabled = state;
     datePickerTerminOdVreme.Enabled = state;
     datePickerTerminDoVreme.Enabled = state;
     dgvTimovi.Enabled = state;
     if (state)
     {
         PocetnaForma.ApplyEnabledStyle(btnSave);
         this.Cursor = Cursors.Arrow;
     }
     else
     {
         PocetnaForma.ApplyDisabledStyle(btnSave);
         this.Cursor = Cursors.WaitCursor;
     }
 }
Example #6
0
 internal static void HandleServerEndSession()
 {
     if (Application.OpenForms.Count > 1)
     {
         for (int i = Application.OpenForms.Count - 1; i >= 0; i--)
         {
             if (Application.OpenForms[i].Name != "PocetnaForma")
             {
                 Application.OpenForms[i]?.Invoke(new Action(
                                                      () =>
                 {
                     Application.OpenForms[i].Enabled = false;
                 }
                                                      ));
             }
         }
     }
     MessageBox.Show("Doslo je do prekida komunikacije sa serverom. Molimo pokusajte ponovo kasnije.");
     CloseOpenForms();
     PocetnaForma?.Invoke(new Action(PocetnaForma.EndSession));
 }
Example #7
0
 public void SetControlEnable(bool state)
 {
     isEnabled                      = state;
     txtNazivTima.Enabled           = state;
     checkListHirurzi.Enabled       = state;
     checkListStazisti.Enabled      = state;
     checkListSestre.Enabled        = state;
     checkListAnesteziolozi.Enabled = state;
     cbOdgovornoLice.Enabled        = state;
     if (state)
     {
         PocetnaForma.ApplyEnabledStyle(btnSave);
         PocetnaForma.ApplyEnabledStyle(btnBack);
         this.Cursor = Cursors.Arrow;
     }
     else
     {
         PocetnaForma.ApplyDisabledStyle(btnSave);
         PocetnaForma.ApplyDisabledStyle(btnBack);
         this.Cursor = Cursors.WaitCursor;
     }
 }
Example #8
0
 public OsobljeForma()
 {
     InitializeComponent();
     PocetnaForma.ApplyDisabledStyle(btnDetails);
     isBtnDetailsEnabled = false;
 }
Example #9
0
 internal void PrikaziRezultatPretrage()
 {
     PostaviDGView();
     isDetailsEnabled = true;
     PocetnaForma.ApplyEnabledStyle(btnDetails);
 }
Example #10
0
 internal void NoResultDgv()
 {
     isDetailsEnabled = false;
     PocetnaForma.ApplyDisabledStyle(btnDetails);
 }
Example #11
0
 private void PocetnaOperacijaForma_Load(object sender, EventArgs e)
 {
     PocetnaForma.ApplyDisabledStyle(btnDetails);
 }
Example #12
0
 public KontrolerKI(PocetnaForma forma)
 {
     PocetnaForma = forma;
 }