/// <summary> /// Добавление /// </summary> private void AddClient() { AddClientViewModel addClientViewModel = new AddClientViewModel(bank); AddClientWindow addClientWindow = new AddClientWindow(addClientViewModel); addClientWindow.Show(); }
private void btnAddClient_Click(object sender, RoutedEventArgs e) { if (AddClientWindow.Visibility != Visibility.Visible) { AddClientWindow.Resize(); } }
private void addClientButton_Click(object sender, RoutedEventArgs e) { AddClientWindow form = new AddClientWindow(); form.ShowDialog(); this.ShowAll(); }
private void btnEditClient_Click(object sender, RoutedEventArgs e) { MegaStockistModel megaStck = dgvclientmega.SelectedItem as MegaStockistModel; AddClientWindow acw = new AddClientWindow(this, megaStck); acw.ShowDialog(); }
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(); } }
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(); } }
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(); } }
void ExecuteShowAddClientWindow() { AddClientWindow addClientWindow = new AddClientWindow(new Client() { }); if (addClientWindow.ShowDialog() == true) { ExecuteUpdateClients(); } }
/// <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(); } } }
void ExecuteEditClient(Client parameter) { AddClientWindow addClientWindow = new AddClientWindow(parameter); // 如果添加成功就更新数据 if (addClientWindow.ShowDialog() == true) { ExecuteUpdateClients(); //UpdateClients.Execute(); } }
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(); }
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)); }
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); } }
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); } }
public void ShowAddClientWindow() { AddClientWindow window = new AddClientWindow(serviceManager); window.Show(); }
private void AddBtn_Click(object sender, RoutedEventArgs e) { AddClientWindow addClientWindow = new AddClientWindow(); addClientWindow.ShowDialog(); }
private void btnAddClient_Click(object sender, RoutedEventArgs e) { AddClientWindow acw = new AddClientWindow(this); acw.ShowDialog(); }