/// <summary> /// Default constructor for wndMain /// </summary> public wndMain() { try { InitializeComponent(); Logic = new clsMainLogic(); sql = new clsMainSQL(); ItemLogic = new clsItemsLogic(); ds = new DataSet(); SelectedItems = new List <clsItem>(); SearchLogic = new clsSearchLogic(); // Populate cbItemList List <clsItem> item = ItemLogic.Items(); cbItemList.SetBinding(ComboBox.ItemsSourceProperty, new Binding() { Source = item }); cbItemList.DisplayMemberPath = "sItemDesc"; } catch (Exception ex) { throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + " " + MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message); } }
public wndMain() { try { InitializeComponent(); //searchWindow = new Search.wndSearch(this); //searchItems = new Items.wndItems(this); MainLogic = new clsMainLogic(); MyList = new List <clsLineItems>(); editOrAdd = false; //Items go into combo box Item_List_2.ItemsSource = MainLogic.ListItems(); //populates data grid Item_Display.ItemsSource = MyList; /* * clsSql.sInvoiceNum = ""; * clsSql.sTotalCost = ""; * clsSql.sInvoiceDate = "";*/ //initalize window ItemsWindow = new Items.wndItems(this); clsSL = new clsSearchLogic(); Edit_Invoice.IsEnabled = false; Delete_Invoice.IsEnabled = false; Save_Invoice.IsEnabled = false; } catch (Exception ex) { throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType + "." + MethodInfo.GetCurrentMethod().Name + "->" + ex.Message); } }