private void button_Click(object sender, RoutedEventArgs e)
        {
            AddDeductionType addDeductionType = new AddDeductionType();

            addDeductionType.mode = 1;
            addDeductionType.Show();
        }
        private void edit_Click(object sender, RoutedEventArgs e)
        {
            var x = ((DeductionType)datagridview.SelectedItem);
            AddDeductionType addDeductionType = new AddDeductionType();

            addDeductionType.deductiontypeid = x.DeductionTypeID;
            addDeductionType.mode            = 2;
            addDeductionType.Show();
        }