/// <summary> /// Contructor to initialize variables /// </summary> public clsItemsLogic() { try { //SQL logic for implementation. itemsSQL = new clsItemsSQL(); //Object to access sql statements //Lists need in implementation. lineItemsList = new List <clsLineItemsObj>(); //New list of line items objects. itemDescList = new List <clsItemDescObj>(); //New list of item description objects. invoicesConnectedToItem = new List <clsLineItemsObj>(); //Keep track of item connected to invoice //Populate Line items list with database rows. lineItemsList = itemsSQL.SelectLineItemData(); //Populate item Desc list with database rows. itemDescList = itemsSQL.SelectItemDescData(); } catch (Exception ex) { //This is the top level method so we want to handle the exception HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name, MethodInfo.GetCurrentMethod().Name, ex.Message); } }
/// <summary> /// Constructor for the items logic class /// </summary> public clsItemsLogic() { try { SQL = new clsItemsSQL(); items = SQL.GetAllItems(); } catch (Exception ex) { throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " --> " + ex.Message); } }
public wndItems() { InitializeComponent(); try { //Initialize objects to access respective classes itemsLogic = new clsItemsLogic(); itemsSQL = new clsItemsSQL(); DA = new clsDataAccess(); LineItem = itemsLogic.GetLineItems(itemsSQL.GetLineItems()); FillBox(); } catch (Exception ex) { //Just throw the exception throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " -> " + ex.Message); } }
/// <summary> /// constructor /// </summary> public clsItemsLogic() { db = new clsDataAccess(); sql = new clsItemsSQL(); }