示例#1
0
 /// <summary>
 /// Submits user selected date range
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmdSubmitRange_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         //Populate Invoice Combobox with invoiceNums between date range
         lstInvoiceSource           = query.GetInvoiceNumbersByDateRange(dpBeginDate.SelectedDate.Value.Date.ToString(), dpEndDate.SelectedDate.Value.Date.ToString());
         cmbInvoiceNums.ItemsSource = lstInvoiceSource;
     }
     catch (System.Exception ex)
     {
         HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name,
                     MethodInfo.GetCurrentMethod().Name, ex.Message);
     }
 }
示例#2
0
        /// <summary>
        /// Search window constructor
        /// </summary>
        public wndSearch()
        {
            try
            {
                InitializeComponent();

                query            = new clsDBQueries();
                lstInvoiceSource = new List <int>();
                lstItemSource    = new List <string>();

                lstInvoiceSource = query.GetInvoiceNumbersByDateRange(dpBeginDate.SelectedDate.Value.Date.ToString(), dpEndDate.SelectedDate.Value.Date.ToString());
                lstItemSource    = query.GetItemsDesc();

                cmbInvoiceNums.ItemsSource = lstInvoiceSource;
                cmbItems.ItemsSource       = lstItemSource;
            }
            catch (Exception ex)
            {
                throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." +
                                    MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message);
            }
        }