Exemplo n.º 1
0
        private void DgItemList_LostFocus(object sender, RoutedEventArgs e)
        {
            SaveDataHandler.OpenConnection();
            for (int i = 0; i < categoryManager.SelectedCategoryItems.Count; i++)
            {
                SaveDataHandler.UpdateItemInTableManualConnection(categoryManager.SelectedCategoryItems[i]);
            }
            SaveDataHandler.CloseConnection();

            //Console.WriteLine("data grid lost focus");
            //HistoryRecord();
        }
Exemplo n.º 2
0
 private void RewriteAllData()
 {
     SaveDataHandler.OpenConnection();
     for (int i = 0; i < categoryManager.CategoryCount; i++)
     {
         SaveDataHandler.UpdateCategoryInTableManualConnection(categoryManager.Categories[i]);
         for (int x = 0; x < categoryManager.Categories[i].Items.Count; x++)
         {
             SaveDataHandler.UpdateItemInTableManualConnection(categoryManager.Categories[i].Items[x]);
         }
     }
     SaveDataHandler.CloseConnection();
 }