| | |
| | | oMaterGroup.WherePart = ""; |
| | | string DeWhere = ""; |
| | | //DeWhere = " and HUSEORGID = " + ClsPub1.HOrgID; |
| | | if (oMaterGroup.RefreshView()) |
| | | //è¿åå¤è¡è®°å½ |
| | | if (oMaterGroup.RefreshViewMul()) |
| | | { |
| | | //if (oMaterGroup.GetInfoByID(oMaterGroup.oModel.HItemID)) |
| | | //{ |
| | | grdMain.Rows[sRow].Cells[HMaterGroupIDCol].Value = oMaterGroup.omodel.HItemID.ToString(); |
| | | grdMain.Rows[sRow].Cells[HMaterGroupNumberCol].Value = oMaterGroup.oModel.HNumber; |
| | | grdMain.Rows[sRow].Cells[HMaterGroupNameCol].Value = oMaterGroup.oModel.HName; |
| | | int i = 0; |
| | | foreach (DBUtility.ClsGy_Base_Model oSub in oMaterGroup.omodelList) |
| | | { |
| | | if (oMaterGroup.GetInfoByID(DBUtility.ClsPub.isStrNull(oSub.HItemID))) |
| | | { |
| | | if (sRow + i > grdMain.Rows.Count - 10) |
| | | { |
| | | grdMain.Rows.Add(); |
| | | } |
| | | grdMain.Rows[sRow + i].Cells[HMaterGroupIDCol].Value = oMaterGroup.omodel.HItemID.ToString(); |
| | | grdMain.Rows[sRow + i].Cells[HMaterGroupNumberCol].Value = oMaterGroup.omodel.HNumber.ToString(); |
| | | grdMain.Rows[sRow + i].Cells[HMaterGroupNameCol].Value = oMaterGroup.omodel.HName.ToString(); |
| | | } |
| | | i++; |
| | | } |
| | | oEdit.Text = oMaterGroup.omodel.HNumber; |
| | | //} |
| | | //else |
| | | //{ |
| | | // grdMain.Rows[sRow].Cells[HMaterGroupIDCol].Value = 0; |
| | | // grdMain.Rows[sRow].Cells[HMaterGroupNumberCol].Value = ""; |
| | | // grdMain.Rows[sRow].Cells[HMaterGroupNameCol].Value = ""; |
| | | //} |
| | | } |
| | | else |
| | | { |
| | |
| | | grdMain.Rows[sRow].Cells[HMaterGroupNumberCol].Value = ""; |
| | | grdMain.Rows[sRow].Cells[HMaterGroupNameCol].Value = ""; |
| | | } |
| | | |
| | | //è¿ååè¡è®°å½ |
| | | //if (oMaterGroup.RefreshView()) |
| | | //{ |
| | | // //if (oMaterGroup.GetInfoByID(oMaterGroup.oModel.HItemID)) |
| | | // //{ |
| | | // grdMain.Rows[sRow].Cells[HMaterGroupIDCol].Value = oMaterGroup.omodel.HItemID.ToString(); |
| | | // grdMain.Rows[sRow].Cells[HMaterGroupNumberCol].Value = oMaterGroup.oModel.HNumber; |
| | | // grdMain.Rows[sRow].Cells[HMaterGroupNameCol].Value = oMaterGroup.oModel.HName; |
| | | // oEdit.Text = oMaterGroup.omodel.HNumber; |
| | | // //} |
| | | // //else |
| | | // //{ |
| | | // // grdMain.Rows[sRow].Cells[HMaterGroupIDCol].Value = 0; |
| | | // // grdMain.Rows[sRow].Cells[HMaterGroupNumberCol].Value = ""; |
| | | // // grdMain.Rows[sRow].Cells[HMaterGroupNameCol].Value = ""; |
| | | // //} |
| | | //} |
| | | //else |
| | | //{ |
| | | // grdMain.Rows[sRow].Cells[HMaterGroupIDCol].Value = 0; |
| | | // grdMain.Rows[sRow].Cells[HMaterGroupNumberCol].Value = ""; |
| | | // grdMain.Rows[sRow].Cells[HMaterGroupNameCol].Value = ""; |
| | | //} |
| | | break; |
| | | default: |
| | | break; |