/// <summary> /// the Search window Constructor /// </summary> public wndSearch() { try { InitializeComponent(); MyClsSearchSQL = new clsSearchSQL(); MyClsSearchLogic = new clsSearchLogic(); InvoicesDataGrid.ItemsSource = MyClsSearchLogic.AllInvoices(); //Database to grid box cbChooseInvoice.ItemsSource = MyClsSearchLogic.OnlyInvoiceNum(); //InvoiceDatabase to Invoice number box cbChooseCharge.ItemsSource = MyClsSearchLogic.OnlyInvoiceCost(); //costDatabase to cost box } catch (Exception ex) { HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name, MethodInfo.GetCurrentMethod().Name, ex.Message); } }
public wndSearch() { try { InitializeComponent(); searchLogic = new clsSearchLogic(); searchSQL = new clsSearchSQL(); ObservableCollection <clsInvoice> invoices = searchLogic.getInvoices(searchSQL.SelectAllInvoices()); dgInvoices.ItemsSource = invoices; cboNum.ItemsSource = searchLogic.getInvoiceNums(); cboDate.ItemsSource = searchLogic.getInvoiceDates(); cboCost.ItemsSource = searchLogic.getInvoiceCosts(); } catch (Exception ex) { HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name, MethodInfo.GetCurrentMethod().Name, ex.Message); } }
private clsSearchSQL sql; // Sql String Object /// <summary> /// Object Constructor /// </summary> public clsSearchLogic() { db = new clsDataAccess(); sql = new clsSearchSQL(); }
}//end property #endregion #region Constructor /// <summary> /// constructor /// </summary> public clsSearchLogic() { MyclsSearchSQL = new clsSearchSQL(); }