コード例 #1
0
        private void partsAddButton_Click(object sender, EventArgs e)
        {
            //PartForm addPart = new PartForm();
            //this.Hide();
            //addPart.Show();
            this.Hide();
            PartForm addPart = new PartForm();

            addPart.ShowDialog();
            addPart = null;
            this.Show();
        }
コード例 #2
0
 private void partsModifyButton_Click(object sender, EventArgs e)
 {
     if (partsGridView.DefaultCellStyle.SelectionBackColor == System.Drawing.Color.Yellow)
     {
         partsGridView.ClearSelection();
         partsGridView.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.White;
         this.Hide();
         PartForm modifyPart = new PartForm(Inventory.SelectedPartPartID);
         modifyPart.ShowDialog();
         modifyPart = null;
         this.Show();
     }
     else
     {
         MessageBox.Show("No part is selected.");
     }
 }