internal void UrediKontaktnoOsebo()
        {
            var urediOsebo = new OsebaManage(TrenutnaKontaktna, Enums.ActionState.Edit);

            urediOsebo.ShowDialog();
            if (urediOsebo.DialogResult.HasValue && urediOsebo.DialogResult.Value)
            {
            }
        }
        internal bool UrediIzbrano()
        {
            var urediOsebo = new OsebaManage(TrenutnoPrikazana, Enums.ActionState.Edit);

            urediOsebo.ShowDialog();
            if (urediOsebo.DialogResult.HasValue && urediOsebo.DialogResult.Value)
            {
                return(true);
            }
            return(false);
        }
        internal void UrediKontaktnaOsebo()
        {
            var urediOsebo = new OsebaManage(TrenutnaKontaktna, Enums.ActionState.Edit);

            urediOsebo.ShowDialog();

            if (urediOsebo.DialogResult.HasValue && urediOsebo.DialogResult.Value)
            {
                var successMessage = new WarningWindow("Oseba je bila uspesno shranjena.");
                successMessage.ShowDialog();
            }
        }
Beispiel #4
0
 public ManageOsebaViewModel(OsebaManage _window = null, OsebaView oseba = null, ActionState Action = ActionState.Create)
 {
     if (oseba != null)
     {
         _oseba = oseba;
     }
     else
     {
         _oseba = new OsebaView();
     }
     WindowAction = Action;
     NastaviGumbe(Action, _window);
 }
Beispiel #5
0
        /// <summary>
        /// Nastavi potrditveni gumb na oknu
        /// </summary>
        /// <param name="Action"></param>
        /// <param name="_window"></param>
        private void NastaviGumbe(ActionState Action, OsebaManage _window)
        {
            switch (Action)
            {
            case ActionState.Create:
                _window.BtnOk.Content = "Ustvari";
                break;

            case ActionState.Edit:
                _window.BtnOk.Content = "Uredi";
                break;

            case ActionState.Delete:
                _window.BtnOk.Content = "Izbriši";
                break;
            }
            _window.BtnCancel.Content = "Nazaj";
        }
        private void NovaOsebaMenuItem_Click(object sender, RoutedEventArgs e)
        {
            var novaOseba = new OsebaManage();

            novaOseba.ShowDialog();
        }