private void button1_Click(object sender, RoutedEventArgs e)
 {
     SimpleSpareSelectView v = new SimpleSpareSelectView();
     bool? res = v.ShowDialog();
     if (v.SV != null)
     {
         SpareID = v.SV.id;
         edtSpare.Text = v.SV.name + " (" + v.SV.codeShatem + ")";
     }
 }
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            SimpleSpareSelectView v = new SimpleSpareSelectView();
            bool?res = v.ShowDialog();

            if (v.SV != null)
            {
                SpareID       = v.SV.id;
                edtSpare.Text = v.SV.name + " (" + v.SV.codeShatem + ")";
            }
        }