/// <summary>
        /// Opens the daily prices record window for adding a new record
        /// </summary>
        private void buttonAdd_Click(object sender, RoutedEventArgs e)
        {
            DailyPricesWindow dailyPricesWindow = new DailyPricesWindow();

            dailyPricesWindow.Closed += DailyPricesWindow_Closed;
            dailyPricesWindow.ShowDialog();
        }
 /// <summary>
 /// Opens the daily prices record window for editing
 /// </summary>
 private void buttonEdit_Click(object sender, RoutedEventArgs e)
 {
     if (DataGridDailyPrices.SelectedItem != null)
     {
         DataRowView       datagridRow       = (DataRowView)DataGridDailyPrices.SelectedItems[0];
         DailyPricesWindow dailyPricesWindow = new DailyPricesWindow(Int32.Parse(datagridRow["ID"].ToString())); // Pass the ID for record editing
         dailyPricesWindow.Closed += DailyPricesWindow_Closed;
         dailyPricesWindow.ShowDialog();
     }
 }