private void toolDetailQuery_Click(object sender, EventArgs e)
{
selectType s_type=0;
if (this.dgv_MaterialList.Visible)
{
s_type = selectType.Matieral;
}
else if (this.dgv_PartsList.Visible)
{
s_type = selectType.Parts;
}
else if (this.dgv_productList.Visible)
{
s_type = selectType.Product;
}
QueryStructForm o = new QueryStructForm(Convert.ToInt16(s_type));
o.StartPosition = FormStartPosition.CenterParent;
if (o.ShowDialog()==DialogResult.OK) {
if (this.dgv_MaterialList.Visible)
{
this.dgv_MaterialList.DataSource = m_structService.GetMaterailList(o.Materails);
}
else if (this.dgv_PartsList.Visible)
{
this.dgv_PartsList.DataSource = m_structService.GetPartsList(o.Parts);
}
else if (this.dgv_productList.Visible)
{
this.dgv_productList.DataSource = m_structService.GetProductList(o.Products);
}
}
}