private void btnAdd_Click(object sender, EventArgs e)
        {
            if (!btnAdd.Enabled)
            {
                return;
            }
            if (cboPartNo.DataSource == null)
            {
                return;
            }
            if (cboPartNo.SelectedIndex < 0)
            {
                return;
            }

            _selectedpart = new PartInfo(cboPartNo.SelectedValue.ToString());
            DialogResult  = System.Windows.Forms.DialogResult.OK; Close();
        }
        /// <summary>
        /// Creates a new instance of PartSupersessionSelectionDialog.
        /// </summary>
        public PartSupersessionSelectionDialog(PartInfo superseded)
        {
            InitializeComponent();

            _supersededpart = superseded;
        }
 private void btnCreate_Click(object sender, EventArgs e)
 {
     _selectedpart = null;
     DialogResult  = System.Windows.Forms.DialogResult.OK; Close();
 }