private void InitialObjectRelation()
{
if (this.Document != null)
{
this.dGVProduct.DataSource = new FileHelper().getDataTableBySql("*", "WHERE DEL_FLAG='N' AND PRODUCTLEVEL=1 AND PRODUCTID IN (SELECT RELATIONOBJECTID FROM ObjectRelation WHERE MASTEROBJECTTYPE='Document' AND RELATIONOBJECTTYPE='Product' AND DEL_FALG='N' AND MASTEROBJECTID='" + this.Document.DOCID + "')", "PDM_ALL_PRODUCT");
this.dgvMaterial.DataSource = new FileHelper().getDataTableBySql("*", "WHERE DEL_FLAG='N' AND MATERIALID IN (SELECT RELATIONOBJECTID FROM ObjectRelation WHERE MASTEROBJECTTYPE='Document' AND RELATIONOBJECTTYPE='Material' AND DEL_FALG='N' AND MASTEROBJECTID='" + this.Document.DOCID + "')", "PDM_MATERAIL");
this.dGVSemiProduct.DataSource = new FileHelper().getDataTableBySql("*", "WHERE DEL_FLAG='N' AND PRODUCTLEVEL=2 AND PRODUCTID IN (SELECT RELATIONOBJECTID FROM ObjectRelation WHERE MASTEROBJECTTYPE='Document' AND RELATIONOBJECTTYPE='SemiProduct' AND DEL_FALG='N' AND MASTEROBJECTID='" + this.Document.DOCID + "')", "PDM_ALL_PRODUCT");
}
}