private void btnItemSelect_Click(object sender, RoutedEventArgs e)
 {
     SelectView v = new SelectView();
     v.ClassName = (new car_producer()).ToString();
     v.ShowDialog();
     loadComboBox_CarProducers();
     edtProducer.SelectedItem = v.RES;
 }
 private void btnBankSelect_Click(object sender, RoutedEventArgs e)
 {
     SelectView v = new SelectView();
     v.ClassName = (new bank()).ToString();
     v.ShowDialog();
     LoadBanks();
     if (edtBank.SelectedValue != null)
         edtBank.SelectedValue = v.Selected._Id;
 }
 private void btnAccountSelect_Click(object sender, RoutedEventArgs e)
 {
     SelectView v = new SelectView();
     v.ClassName = (new account()).ToString();
     v.ShowDialog();
     LoadAccounts();
     if (v.Selected != null)
         edtAccount.SelectedValue = v.Selected._Id;
 }
 private void btnAccountSelect_Click(object sender, RoutedEventArgs e)
 {
     //2 select window
     SelectView v = new SelectView();
     v.ClassName = (new account()).ToString();
     v.ShowDialog();
     LoadComboboxAccount();
     edtAccount.SelectedItem = v.RES;
 }
        private void btnBankSelect_Click(object sender, RoutedEventArgs e)
        {
            SelectView v = new SelectView();

            v.ClassName = (new bank()).ToString();
            v.ShowDialog();
            LoadBanks();
            if (edtBank.SelectedValue != null)
            {
                edtBank.SelectedValue = v.Selected._Id;
            }
        }
 private void btnBankSelect_Click(object sender, RoutedEventArgs e)
 {
     SelectView v = new SelectView();
     v.ClassName = (new bank_account()).ToString();
     if (edtBankAccount.SelectedItem != null)
         v.ParentItemID = (int)edtAccount.SelectedValue;
     v.ShowDialog();
     LoadBankAccounts();
     if (v.Selected != null)
         edtBankAccount.SelectedValue = v.Selected._Id;
     else
         edtBankAccount.SelectedIndex = 0;
 }
 private void btnAccountSelect_Click(object sender, RoutedEventArgs e)
 {
     SelectView v = new SelectView();
     v.ClassName = (new account()).ToString();
     v.ShowDialog();
     LoadComboboxAccount();
     try
     {
         edtCustomer.SelectedValue = v.Selected._Id;
     }
     catch (Exception)
     {
     }
 }
        private void CallSelectWindowUnit()
        {
            SelectView v = new SelectView();
            v.ClassName = (new unit()).ToString();
            v.ShowDialog();
            loadComboBox_Units();

            //edtUnit.SelectedItem = v.RES;
            if (v.Selected != null)
                edtUnit.SelectedValue = v.Selected._Id;
        }
        private void CallSelectWindowGroup()
        {
            SelectView v = new SelectView();
            v.ClassName = (new spare_group()).ToString();
            v.ShowDialog();
            loadComboBox_SpareGroups();

            //edtGroup.SelectedItem = v.RES;
            if (v.Selected != null)
                edtGroup.SelectedValue = v.Selected._Id;
        }
 private void btnWarehouseSelect_Click(object sender, RoutedEventArgs e)
 {
     SelectView v = new SelectView();
     v.ClassName = (new warehouse()).ToString();
     v.ShowDialog();
     LoadComboboxWarehouse();
     edtWarehouse.SelectedItem = v.RES;
 }