void ModData() { if (dgvMain.CurrentRow != null) { FormGoodsMaterialItem dlg = new FormGoodsMaterialItem(); dlg.m_GoodsMaterialItem.GoodsMaterialID = Convert.ToInt32(dgvMain.CurrentRow.Cells["ColumnGoodsMaterialID"].Value); dlg.m_GoodsMaterialItem.GoodsSubClassifyID = Convert.ToInt32(dgvMain.CurrentRow.Cells["ColumnGoodsSubClassifyID"].Value); dlg.m_GoodsMaterialItem.Cost = Convert.ToDouble(dgvMain.CurrentRow.Cells["ColumnCost"].Value); dlg.m_GoodsMaterialItem.GoodsMaterialName = dgvMain.CurrentRow.Cells["ColumnMaterialName"].Value.ToString(); dlg.m_GoodsMaterialItem.GoodsMaterialNO = dgvMain.CurrentRow.Cells["ColumnMaterialNO"].Value.ToString(); dlg.m_GoodsMaterialItem.PinYin = dgvMain.CurrentRow.Cells["ColumnPinYin"].Value.ToString(); dlg.m_GoodsMaterialItem.Unit = dgvMain.CurrentRow.Cells["ColumnUnit"].Value.ToString(); dlg.m_GoodsMaterialItem.GoodsClassify = dgvMain.CurrentRow.Cells["ColumnGoodsClassify"].Value.ToString().Trim(); dlg.m_GoodsMaterialItem.GoodsSubClassify = dgvMain.CurrentRow.Cells["ColumnGoodsSubClassify"].Value.ToString().Trim(); dlg.ShowDialog(); ShowGoodsMaterial(); } }
private void toolStripButtonAdd_Click(object sender, EventArgs e) { FormGoodsMaterialItem dlg = new FormGoodsMaterialItem(); dlg.ShowDialog(); ShowGoodsMaterial(); }