public void StreamOut(RStrmOut writer) { foreach (var property in ModelSchema.BridgeAssignmentEstItemKeywordArray.RKwdCollection) { string propertyName = property.Name; switch (property.Id) { case (int)BridgeAssignEstItemProperty.Id: writer.WriteString(propertyName, EstItemId); break; case (int)BridgeAssignEstItemProperty.Qty: writer.WriteDouble(propertyName, QuantityGenerated, 4); break; case (int)BridgeAssignEstItemProperty.Asn: foreach (var item in VariableAssignmentList) { writer.ObjectBegin(propertyName); item.StreamOut(writer); writer.ObjectEnd(); } break; } } }
public void StreamOut(RStrmOut writer) { foreach (var property in ModelSchema.BridgeAssignmentPassKeywordArray.RKwdCollection) { string propertyName = property.Name; switch (property.Id) { case (int)BridgeAssignPassProperty.PTko: writer.WriteInteger(propertyName, PrimaryTakeoffNumber); break; case (int)BridgeAssignPassProperty.Asn: foreach (var item in VariableAssignmentList) { writer.ObjectBegin(propertyName); item.StreamOut(writer); writer.ObjectEnd(); } break; } } }
public void StreamOut(RStrmOut writer) { foreach (var obj in AssignmentPassCollection) { if (obj.PrimaryTakeoffObjectCollection == null || obj.PrimaryTakeoffObjectCollection.Count() == 0) { obj.PrimaryTakeoffNumber = -1; } else { if (TakeoffObjectCollection != null) { var primaryTko = obj.PrimaryTakeoffObjectCollection.FirstOrDefault(); obj.PrimaryTakeoffNumber = primaryTko.TkoRefId; } } } writer.ObjectBegin(""); foreach (var property in ModelSchema.BridgeAssignmentKeywordArray.RKwdCollection) { string propertyName = property.Name; switch (property.Id) { case (int)BridgeAssignmentProperty.Tko: if (TakeoffObjectCollection != null) { foreach (var item in TakeoffObjectCollection) { writer.ObjectBegin(propertyName); item.StreamOut(writer); writer.ObjectEnd(); } } break; case (int)BridgeAssignmentProperty.Res: foreach (var item in ResourceCollection) { writer.ObjectBegin(propertyName); item.StreamOut(writer); writer.ObjectEnd(); } break; case (int)BridgeAssignmentProperty.Pass: foreach (var item in AssignmentPassCollection) { writer.ObjectBegin(propertyName); item.StreamOut(writer); writer.ObjectEnd(); } break; case (int)BridgeAssignmentProperty.Item: foreach (var item in ItemDetailCollection) { writer.ObjectBegin(propertyName); item.StreamOut(writer); writer.ObjectEnd(); } break; case (int)BridgeAssignmentProperty.AsnId: writer.WriteString(propertyName, AssignmentId); break; } } writer.ObjectEnd(); }