// 虚拟一个设备 public ResourceObject AddVirtualEq(WrkgrpObject wrkgrp, EquipmentObject eq, int index) { string _ID = "v_eq:" + wrkgrp._ID + "," + eq._ID + "," + index;// 组内编号 var rslt = new ResourceObject(); rslt._ID = _ID; Add(rslt); return(rslt); }
public ResourceTypeObject GetEqRs(WrkgrpObject wrkgrp, EquipmentObject eq) { string _ID = "类型:" + wrkgrp._ID + "," + eq._ID; ResourceTypeObject rslt = GetByID(_ID); if (rslt == null) { rslt = new ResourceTypeObject(); rslt._ID = _ID; rslt.Wrkgrp_ID = wrkgrp._ID; rslt.Eq_ID = eq._ID; this.Add(rslt); } return(rslt); }