コード例 #1
0
        /// <summary>
        /// Добавление
        /// </summary>
        private void AddClient()
        {
            AddClientViewModel addClientViewModel = new AddClientViewModel(bank);
            AddClientWindow    addClientWindow    = new AddClientWindow(addClientViewModel);

            addClientWindow.Show();
        }
コード例 #2
0
 private void btnAddClient_Click(object sender, RoutedEventArgs e)
 {
     if (AddClientWindow.Visibility != Visibility.Visible)
     {
         AddClientWindow.Resize();
     }
 }
コード例 #3
0
        private void addClientButton_Click(object sender, RoutedEventArgs e)
        {
            AddClientWindow form = new AddClientWindow();

            form.ShowDialog();
            this.ShowAll();
        }
コード例 #4
0
        private void btnEditClient_Click(object sender, RoutedEventArgs e)
        {
            MegaStockistModel megaStck = dgvclientmega.SelectedItem as MegaStockistModel;

            AddClientWindow acw = new AddClientWindow(this, megaStck);

            acw.ShowDialog();
        }
コード例 #5
0
        private void btnEditClient_Click(object sender, RoutedEventArgs e)
        {
            MembersModel depotStck = dgvMembers.SelectedItem as MembersModel;

            if (depotStck != null)
            {
                AddClientWindow acw = new AddClientWindow(this, depotStck);
                acw.ShowDialog();
            }
        }
コード例 #6
0
        private void btnEditClient_Click(object sender, RoutedEventArgs e)
        {
            HomeStockistModel hs = dgvclient.SelectedItem as HomeStockistModel;

            if (hs != null)
            {
                AddClientWindow acw = new AddClientWindow(this, hs);
                acw.ShowDialog();
            }
        }
コード例 #7
0
        private void btnEditClient_Click(object sender, RoutedEventArgs e)
        {
            EmployeeModel empS = dgvclientemp.SelectedItem as EmployeeModel;

            if (empS != null)
            {
                AddClientWindow acw = new AddClientWindow(this, empS);
                acw.ShowDialog();
            }
        }
コード例 #8
0
        void ExecuteShowAddClientWindow()
        {
            AddClientWindow addClientWindow = new AddClientWindow(new Client()
            {
            });

            if (addClientWindow.ShowDialog() == true)
            {
                ExecuteUpdateClients();
            }
        }
コード例 #9
0
 /// <summary>
 /// Button Method to ADD new Client
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void BTN_Clients_AddClient(object sender, RoutedEventArgs e)
 {
     if (TV_Departments.SelectedItem != null)
     {
         if ((TV_Departments?.SelectedItem as Department <Client>).Name != Bank.bankName)
         {
             AddClientWindow AddClientWindow = new AddClientWindow(this, Bank.Departments[0].Departments.IndexOf(TV_Departments?.SelectedItem as Department <Client>));
             AddClientWindow.Show();
         }
     }
 }
コード例 #10
0
        void ExecuteEditClient(Client parameter)
        {
            AddClientWindow addClientWindow = new AddClientWindow(parameter);

            // 如果添加成功就更新数据
            if (addClientWindow.ShowDialog() == true)
            {
                ExecuteUpdateClients();
                //UpdateClients.Execute();
            }
        }
コード例 #11
0
 private void editClientButton_Click(object sender, RoutedEventArgs e)
 {
     if (clientGrid.SelectedItem != null)
     {
         var             edit = (Client)clientGrid.SelectedItem;
         AddClientWindow form = new AddClientWindow(DBContext.Clients.Find(edit.ID).ID);
         form.ShowDialog();
     }
     else
     {
         MessageBox.Show("Не выбрано поле для редактирования", "Ошибка");
     }
     this.ShowAll();
 }
コード例 #12
0
 private void AddClient_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         AddClientWindow addClientWindow = new AddClientWindow(_context);
         var             result          = addClientWindow.ShowDialog();
         if (result == true)
         {
             clients.Add(_context.Clients.OrderByDescending(c => c.ID).FirstOrDefault());
         }
     }
     catch
     {
     }
     //this.NavigationService.Navigate(new Uri("View/AddAndEditClientPage.xaml", UriKind.Relative));
 }
コード例 #13
0
ファイル: ServicePage.xaml.cs プロジェクト: Arhurist/School
 private void RecButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var SelectedItem = ServiceGrid.SelectedItem as Service; /*взяли выбранную строку в датагриде и присвоили сервайс, поскольку у нас там загружены наши услуги*/
         if (SelectedItem != null)
         {
             AddClientWindow editServiceWindow = new AddClientWindow(SelectedItem);
             editServiceWindow.ShowDialog();
             GetServices(SortBox.Text, FilterBox.Text, SearchBox.Text);
         }
         else
         {
             throw new Exception("Не выбрана запись");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
コード例 #14
0
 private void RecButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var SelectedItem = ServiceGrid.SelectedItem as Service; //взяли выбранную строку в ДатаГриде и привели к типу Service(там услуги)
         if (SelectedItem != null)                               //непустое значение
         {
             AddClientWindow addClientWindow = new AddClientWindow(SelectedItem);
             //открыть окно в диалоге
             addClientWindow.ShowDialog();
             Get_Service(SortBox.Text, FilterBox.Text, SearchBox.Text);
         }
         else
         {
             throw new Exception("Не выбрана запись");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
コード例 #15
0
        public void ShowAddClientWindow()
        {
            AddClientWindow window = new AddClientWindow(serviceManager);

            window.Show();
        }
コード例 #16
0
        private void AddBtn_Click(object sender, RoutedEventArgs e)
        {
            AddClientWindow addClientWindow = new AddClientWindow();

            addClientWindow.ShowDialog();
        }
コード例 #17
0
        private void btnAddClient_Click(object sender, RoutedEventArgs e)
        {
            AddClientWindow acw = new AddClientWindow(this);

            acw.ShowDialog();
        }