コード例 #1
0
 private void MainScreen_Load(object sender, EventArgs e)
 {
     DGVBuild.dgvStyle(partListGrid);
     DGVBuild.dgvStyle(productListGrid);
     DGVBuild.displAllPartsDGV(partListGrid);
     DGVBuild.displProductsDGV(productListGrid);
 }
コード例 #2
0
 //delete buttons
 private void partDeleteButton_Click(object sender, EventArgs e)
 {
     if (PartIndx != null)
     {
         for (int j = 0; j < Inventory.AllParts.Count; j++)
         {
             if (Inventory.AllParts[j].PartID == (int)partListGrid.Rows[(int)PartIndx].Cells[0].Value)
             {
                 var confirmResult = MessageBox.Show("Are you sure to delete this item?",
                                                     "Confirm Delete!", MessageBoxButtons.YesNo);
                 if (confirmResult == DialogResult.Yes)
                 {
                     Inventory.deletePart(j);
                 }
             }
         }
         DGVBuild.displAllPartsDGV(partListGrid);
         PartIndx = null;
     }
     else
     {
         MessageBox.Show("Select a row");
     }
     partListGrid.ClearSelection();
 }
コード例 #3
0
 private void AddModifyProductScreen_Load(object sender, EventArgs e)
 {
     DGVBuild.dgvStyle(dataGridView1);
     DGVBuild.dgvStyle(dataGridView2);
     DGVBuild.displAllPartsDGV(dataGridView1);
 }