예제 #1
0
        //this happens off the UI thread
        static void VendorSearchOnExecute(VendorSearchArgs state)
        {
// ReSharper disable InconsistentNaming
            using (var Vendor_Search = new Proc("Vendor_Search"))
// ReSharper restore InconsistentNaming
                state.ResultTable = Vendor_Search.AssignValues(state.Values).ExecuteDataSet(state).Tables[0];
        }
예제 #2
0
 //this happens off the UI thread
 void VendorSearchOnExecute(VendorSearchArgs state)
 {
     using (Proc Vendor_Search = new Proc("Vendor_Search"))
     {
         Vendor_Search.AssignValues(state.values);
         state.resultTable = Vendor_Search.ExecuteDataTable(state);
     }
 }
예제 #3
0
 void VendorSearchOnCompleted(VendorSearchArgs state)
 {
     if (state.Success)
     {
         grdVendorList.ItemsSource = state.resultTable.DefaultView;
         //grdVendorList.Columns[grdVendorList.Columns.Count - 1].Visibility = Visibility.Hidden; //hide ShortDescription
         //grdVendorList.Columns[grdVendorList.Columns.Count - 2].Visibility = Visibility.Hidden; //hide VendorID
     }
     else
     {
         lblVendorSearchError.Text = state.Text;
     }
 }
예제 #4
0
        void VendorSearchOnCompleted(VendorSearchArgs state)
        {
            if (state.Success)
            {
                lbxVendorList.ItemsSource = state.ResultTable.DefaultView;
                //lbxVendorList.Columns[lbxVendorList.Columns.Count - 1].Visibility = Visibility.Hidden; //hide ShortDescription
                //lbxVendorList.Columns[lbxVendorList.Columns.Count - 2].Visibility = Visibility.Hidden; //hide VendorID

                if (lbxVendorList.Items.Count > 0)
                {
                    Dispatcher.BeginInvoke((Action)(() =>
                    {
                        ((ListBoxItem)lbxVendorList.ItemContainerGenerator.ContainerFromIndex(0))
                        .Focus();
                        lbxVendorList.SelectedIndex = 0;
                    }), System.Windows.Threading.DispatcherPriority.ContextIdle);
                }
            }
            else
            {
                lblVendorSearchError.Text = state.Text;
            }
        }
예제 #5
0
    void VendorSearchOnCompleted(VendorSearchArgs state)
    {
      if (state.Success)
      {
        lbxVendorList.ItemsSource = state.ResultTable.DefaultView;
        //lbxVendorList.Columns[lbxVendorList.Columns.Count - 1].Visibility = Visibility.Hidden; //hide ShortDescription
        //lbxVendorList.Columns[lbxVendorList.Columns.Count - 2].Visibility = Visibility.Hidden; //hide VendorID

        if (lbxVendorList.Items.Count > 0)
        {
          Dispatcher.BeginInvoke((Action)(() =>
          {
            ((ListBoxItem) lbxVendorList.ItemContainerGenerator.ContainerFromIndex(0))
              .Focus();
            lbxVendorList.SelectedIndex = 0;
          }), System.Windows.Threading.DispatcherPriority.ContextIdle);
        }
      }
      else
        lblVendorSearchError.Text = state.Text;
    }
예제 #6
0
    //this happens off the UI thread
    static void VendorSearchOnExecute(VendorSearchArgs state)
    {
// ReSharper disable InconsistentNaming
      using (var Vendor_Search = new Proc("Vendor_Search"))
// ReSharper restore InconsistentNaming
        state.ResultTable = Vendor_Search.AssignValues(state.Values).ExecuteDataSet(state).Tables[0];
    }
예제 #7
0
 void VendorSearchOnCompleted(VendorSearchArgs state)
 {
   if (state.Success)
   {
     grdVendorList.ItemsSource = state.resultTable.DefaultView;
     //grdVendorList.Columns[grdVendorList.Columns.Count - 1].Visibility = Visibility.Hidden; //hide ShortDescription
     //grdVendorList.Columns[grdVendorList.Columns.Count - 2].Visibility = Visibility.Hidden; //hide VendorID
   }
   else
     lblVendorSearchError.Text = state.Text;
 }
예제 #8
0
 //this happens off the UI thread
 void VendorSearchOnExecute(VendorSearchArgs state)
 {
   using (Proc Vendor_Search = new Proc("Vendor_Search"))
   {
     Vendor_Search.AssignValues(state.values);
     state.resultTable = Vendor_Search.ExecuteDataTable(state);
   }
 }