/// <summary>
        /// Open a open contract window the the contract that was selected
        /// </summary>
        /// <param name="sender">The object that was clickde</param>
        /// <param name="e"></param>
        private void editContractClick(object sender, RoutedEventArgs e)
        {
            DataRowView row;

            try
            {
                //Get the first selected item as a DataRowView
                row = dataGrid.SelectedItems[0] as DataRowView;
            } catch
            {
                return;
            }
            //Open a new openContract window with the row, and this window as the opening window
            window = new openContract(row, this);
            window.Show();
        }
        private void rowDoubleClick(object sender, RoutedEventArgs e)
        {
            MouseEventArgs me = e as MouseEventArgs;
            //Open a contract if it is double clicked on the dataGrid
            DataGridRow row = (DataGridRow)sender;

            //Only open a new window if right mouse is not pressed
            if (me.RightButton == MouseButtonState.Pressed)
            {
                return;
            }
            else
            {
                var view = row.Item as DataRowView;
                window = new openContract(view, this);
                window.Show();
            }
        }