private void ButtonCreateNew_Click(object sender, RoutedEventArgs e)
        {
            Window create_window = new CostsRecordWindow(WaysToOpenForm.WaysToOpen.create);

            create_window.ShowDialog();
            RefreshList();
        }
        private void DataGridCell_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            int row_index   = costsGrid.SelectedIndex;
            int id          = -1;
            int current_row = 0;

            foreach (DataRowView row in costsGrid.Items)
            {
                if (current_row != row_index)
                {
                    current_row++;
                    continue;
                }
                id = (int)row.Row.ItemArray[0];
                break;
            }

            Window edit_window = new CostsRecordWindow(WaysToOpenForm.WaysToOpen.edit, id);

            edit_window.ShowDialog();
            RefreshList();
        }