private void selectMaterail()
{
string t_materailId=null;
for (int i = 0; i < dgv_MaterialList.Rows.Count; i++)
{
DataGridViewCheckBoxCell checkcell = (DataGridViewCheckBoxCell)dgv_MaterialList.Rows[i].Cells[0];
Boolean flag = Convert.ToBoolean(checkcell.Value);
if (flag)
{
t_materailId = dgv_MaterialList.Rows[i].Cells["MATERIALID"].Value.ToString().Trim();
}
}
if (t_materailId == null) { MessageBox.Show("请选择一个材料"); return; }
if (filterSelect(t_materailId) == -1)
{
MessageBox.Show("已经在产品结构中"); return;
}
HYPDM.Entities.PDM_STRUCT temp_struct = new HYPDM.Entities.PDM_STRUCT();
temp_struct.OBJECTID = this.copy_Product.PRODUCTID;
temp_struct.ASSOBJECTID = t_materailId;
StructAddForm o = new StructAddForm(temp_struct, m_assoID, this.m_assoType);
o.StartPosition = FormStartPosition.CenterParent;
o.ShowDialog();
}