示例#1
0
 /// <summary>
 /// Default Constructor
 /// </summary>
 public clsMainLogic()
 {
     try
     {
         SQL = new clsMainSQL();
         //get all items
         items = SQL.GetAllItems();
     }
     catch (Exception ex)
     {
         throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " --> " + ex.Message);
     }
 }
示例#2
0
 /// <summary>
 /// Reset Items list when new Item is added in Item window
 /// </summary>
 public void ResetItemsList()
 {
     try
     {
         ItemsList.Clear();
         foreach (Item item in SQL.GetAllItems())
         {
             ItemsList.Add(item);
         }
     }
     catch (Exception ex)
     {
         throw new Exception(MethodInfo.GetCurrentMethod().DeclaringType.Name + "." + MethodInfo.GetCurrentMethod().Name + " --> " + ex.Message);
     }
 }