private void addCartonItem_Click(object sender, EventArgs e)
        {
            NewCartonDetailForm newCarton = new NewCartonDetailForm(1);
            newCarton.ShowDialog(this);

            fillTableAndTextBox();
        }
        /*
         * 新物料导入(添加)
         */
        private void addBtn_Click(object sender, EventArgs e)
        {
            NewMaterialTypeForm newMaterialType = new NewMaterialTypeForm();
            if (newMaterialType.ShowDialog(this) == DialogResult.OK)
            {
                if (newMaterialType.getMaterialType() == 1)
                {
                    NewPackingDetailForm newPackingMaterial = new NewPackingDetailForm(1);
                    newPackingMaterial.ShowDialog(this);

                }
                else if (newMaterialType.getMaterialType() == 2)
                {
                    NewCartonDetailForm newCarton = new NewCartonDetailForm(1);
                    newCarton.ShowDialog(this);
                }

                fillTableAndTextBox();
            }
        }
 private void detailCartonItem_Click(object sender, EventArgs e)
 {
     NewCartonDetailForm newCarton = new NewCartonDetailForm(3, this.cartonTable.Rows[currentRow].Cells[0].Value.ToString());
     newCarton.ShowDialog(this);
 }