Пример #1
0
        private void CreateNewButton_Click(object sender, RoutedEventArgs e)
        {
            checkTime();
            AddAgent addAgent = new AddAgent(this);

            addAgent.ShowDialog();
        }
Пример #2
0
        private void btnAddAgent_Click(object sender, RoutedEventArgs e)
        {
            AgentViewModels agentModel = new AgentViewModels();
            AddAgent        a          = new AddAgent(agentModel); //создаем окно

            a.Title = "Добавить Агента";
            a.Owner = this;//устанавливаем собственника окна
            var result = a.ShowDialog();

            if (result == true)
            {
                agentService.CreateAgent(agentModel);
                ResetCollection("AgentsViewModel");
                int Index = agentsModel.Count - 1;
                dGridAgent.SelectedIndex = Index;
                a.Close();
            }
        }
Пример #3
0
        private void AddAgentWindow(object sender, RoutedEventArgs e)
        {
            AddAgent addAgent = new AddAgent();

            addAgent.ShowDialog();
        }