コード例 #1
0
        public static IEnumerable<XElement> GetFormulationMaterialsXML(Formulation formulation)
        {
            /*
            <object>
                <field name="Materials" />
                <tableSection pivotType="1" propertyCount="92" rowCount="4">
                  <elementTags layout="" />
                  <tableProperty height="0" width="1440" visible="false">
                    <property name="Lot Container Pair" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Lot Container Pair&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1635" visible="true">
                    <property name="Name" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Name&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="480" visible="true">
                    <property name="Materials Step" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Step&quot; keyField=&quot;False&quot; linkTable=&quot;Steps:Steps Step&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1185" visible="true">
                    <property name="Materials Addition Order" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Addition Order&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1800" visible="true">
                    <property name="Materials Percent Volume of Total" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Percent Volume of Total&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1215" visible="true">
                    <property name="Materials wt/wt of Total" />
                    <elementTags fieldData="&lt;fieldData name=&quot;wt/wt of Total&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="660" visible="true">
                    <property name="Materials Stage Number" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Stage #&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1380" visible="true">
                    <property name="Safety Code 1" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Safety Code 1&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1380" visible="true">
                    <property name="Safety Code 2" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Safety Code 2&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1380" visible="true">
                    <property name="Container Updated" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Container Updated&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1380" visible="true">
                    <property name="Materials Nitrogen Content" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Nitrogen Content&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1665" visible="true">
                    <property name="Materials Nitrogen Contribution" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Nitrogen Contribution&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1185" visible="true">
                    <property name="Materials Safety Code 1" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Mat'l Safety Code 1&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1185" visible="true">
                    <property name="Materials Safety Code 2" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Mat'l Safety Code 2&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1620" visible="true">
                    <property name="Materials Phosphorus Content" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Phosphorus Content&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1065" visible="true">
                    <property name="Materials Purity" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Purity&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1110" visible="true">
                    <property name="Materials Container ID" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Container ID&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1905" visible="true">
                    <property name="Materials Phosphorus Contribution" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Phosphorus Contribution&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1185" visible="true">
                    <property name="Materials Sulfur Content" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Sulfur Content&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1455" visible="true">
                    <property name="Materials Lot ID" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Lot ID&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1470" visible="true">
                    <property name="Materials Container Number" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Container #&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1470" visible="true">
                    <property name="Materials Sulfur Contribution" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Sulfur Contribution&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1665" visible="true">
                    <property name="Materials Designed Treat Rate" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Designed Treat Rate&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="5865" visible="true">
                    <property name="Materials Treat Rate" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Treat Rate&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1200" visible="true">
                    <property name="Materials Base Oil Group" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Base Oil Group&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1275" visible="true">
                    <property name="Materials MSDS" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials MSDS&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="2100" visible="true">
                    <property name="Materials Molecular Weight" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Molecular Weight&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="855" visible="true">
                    <property name="Materials Material ID" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Material ID&quot; keyField=&quot;True&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1605" visible="true">
                    <property name="Materials Fluid Code" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Fluid Code&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1410" visible="true">
                    <property name="Materials FC Mod" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials FC Mod&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1650" visible="true">
                    <property name="Materials FC Number" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials FC Number&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1485" visible="true">
                    <property name="Materials FC Prefix" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials FC Prefix&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1560" visible="true">
                    <property name="Materials FC Rev" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials FC Rev&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1305" visible="true">
                    <property name="Materials Status" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Status&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1260" visible="true">
                    <property name="Materials Expiration Date" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Expiration Date&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1935" visible="true">
                    <property name="Materials X-Number Alias" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials X-Number Alias&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1440" visible="true">
                    <property name="Materials HMIS_F" />
                    <elementTags fieldData="&lt;fieldData name=&quot;HMIS_F&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1470" visible="true">
                    <property name="Materials HMIS_H" />
                    <elementTags fieldData="&lt;fieldData name=&quot;HMIS_H&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1800" visible="true">
                    <property name="Materials Manufacturer" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Manufacturer&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1530" visible="true">
                    <property name="Materials On TSCA" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials On TSCA&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="2085" visible="true">
                    <property name="Materials Research Aliases" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Research Aliases&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1515" visible="true">
                    <property name="Materials Shelf Life" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Shelf Life&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1605" visible="true">
                    <property name="Materials Master Lot?" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Master Lot&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1815" visible="true">
                    <property name="Materials Material Type" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Material Type&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1530" visible="true">
                    <property name="Materials HMIS_PE" />
                    <elementTags fieldData="&lt;fieldData name=&quot;HMIS_PE&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1470" visible="true">
                    <property name="Materials HMIS_R" />
                    <elementTags fieldData="&lt;fieldData name=&quot;HMIS_R&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1290" visible="true">
                    <property name="Materials Genre" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Genre&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1740" visible="true">
                    <property name="Materials HiTEC Alias" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials HiTEC Alias&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1410" visible="true">
                    <property name="Materials Formula" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Formula&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1065" visible="true">
                    <property name="Materials Lot Number" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Lot #&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1635" visible="true">
                    <property name="Materials Flash Point" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Flash Point&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1650" visible="true">
                    <property name="Materials Description" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Description&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1560" visible="true">
                    <property name="Materials Champion" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Champion&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1950" visible="true">
                    <property name="Materials HS&amp;E Caution" />
                    <elementTags fieldData="&lt;fieldData name=&quot;HS&amp;amp;E Caution&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1620" visible="true">
                    <property name="Materials Toxicology" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Materials Toxicology&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1275" visible="true">
                    <property name="Materials Role" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Role&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="870" visible="true">
                    <property name="Chemical Structure" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Structure&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="990" visible="true">
                    <property name="Materials Density" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Density&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="840" visible="true">
                    <property name="Materials Percent Active" />
                    <elementTags fieldData="&lt;fieldData name=&quot;% Active&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="855" visible="true">
                    <property name="Materials Cost/Mass" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Cost/Mass&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1155" visible="true">
                    <property name="Materials Cost/Amount" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Cost/Amount&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="4515" visible="true">
                    <property name="Materials Percent Mass" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Mass/Mass&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1875" visible="true">
                    <property name="Materials Percent Mass of Total" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Percent Mass of Total&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="2070" visible="true">
                    <property name="Materials Percent Mass Total Material" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Percent Mass Total Material&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="24135" visible="true">
                    <property name="Materials Batch Mass Planned" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Batch Mass Planned&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="23085" visible="true">
                    <property name="Materials Unit Volume Planned" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Unit Vol Planned&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1050" visible="true">
                    <property name="Materials Inventory ID" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Inventory ID&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="28455" visible="true">
                    <property name="Materials Unit Mass Planned" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Unit Mass Planned&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="795" visible="true">
                    <property name="Materials Supplier" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Supplier&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="23085" visible="true">
                    <property name="Materials Batch Volume Planned" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Batch Vol Planned&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1080" visible="true">
                    <property name="Materials Formula Mass" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Formula Mass&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="930" visible="true">
                    <property name="Materials Molarity" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Molarity&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1530" visible="true">
                    <property name="Materials Batch Mass Actual" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Batch Mass Act.&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1830" visible="true">
                    <property name="Materials Batch Mass Actual Active" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Batch Mass Act. Active&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1110" visible="true">
                    <property name="Materials Batch Volume Actual" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Batch Vol Act.&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1410" visible="true">
                    <property name="Materials Percent Mass Actual" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Act. Mass/Mass&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1905" visible="true">
                    <property name="Materials Mass/Vol" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Mass/Vol&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="960" visible="true">
                    <property name="Materials CAS" />
                    <elementTags fieldData="&lt;fieldData name=&quot;CAS&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1635" visible="true">
                    <property name="Materials Material Mass/Vol" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Material Mass/Vol&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="2115" visible="true">
                    <property name="Materials Percent Mass of Total Actual" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Percent Mass of Total Act.&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1425" visible="true">
                    <property name="Materials Material Molarity" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Material Molarity&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1605" visible="true">
                    <property name="Materials Vol/Vol" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Vol/Vol&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1230" visible="true">
                    <property name="Acute Toxicity" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Acute Toxicity&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1305" visible="true">
                    <property name="Carcinogenicity" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Carcinogenicity&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1035" visible="true">
                    <property name="Eye Effects" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Eye Effects&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1035" visible="true">
                    <property name="Materials On COSSH" />
                    <elementTags fieldData="&lt;fieldData name=&quot;On COSSH&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1230" visible="true">
                    <property name="Physical State" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Physical State&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="975" visible="true">
                    <property name="Sensitizers" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Sensitizers&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1245" visible="true">
                    <property name="Skin Corrosion" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Skin Corrosion&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1890" visible="true">
                    <property name="TOST: Single Exposure" />
                    <elementTags fieldData="&lt;fieldData name=&quot;TOST: Single Exposure&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="1230" visible="true">
                    <property name="TOST : Repeated Exposure" />
                    <elementTags fieldData="&lt;fieldData name=&quot;TOST : Repeated Exposure&quot; /&gt;" />
                  </tableProperty>
                  <tableProperty height="0" width="0" visible="true">
                    <property name="Toxicity Levels" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Toxicity Levels&quot; /&gt;" />
                  </tableProperty>
                  <tableRow height="330" width="0">
                    <tableCell />
                    <tableCell value="X0171650001" foreColor="-16776961" tag="entered" />
                    <tableCell value="1" minValue="1" maxValue="1" />
                    <tableCell />
                    <tableCell />
                    <tableCell value="80.0000 g/kg" minValue="0.08" maxValue="0.08" />
                    <tableCell value="1" minValue="1" maxValue="1" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="100.0000 %" minValue="1" maxValue="1" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="8.0000 %" minValue="0.08" maxValue="0.08" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="1" minValue="1" maxValue="1" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="8.0000 % w/w" minValue="0.08" maxValue="0.08" />
                    <tableCell value="8.0000 %" minValue="0.08" maxValue="0.08" />
                    <tableCell value="8.0000 %" minValue="0.08" maxValue="0.08" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="16 g" minValue="0.016" maxValue="0.016" foreColor="-16776961" tag="entered" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                  </tableRow>
                  <tableRow height="330" width="0">
                    <tableCell />
                    <tableCell value="SPECTRASYNELITE1" foreColor="-16776961" tag="entered" />
                    <tableCell value="1" minValue="1" maxValue="1" />
                    <tableCell />
                    <tableCell />
                    <tableCell value="306.0000 g/kg" minValue="0.306" maxValue="0.306" />
                    <tableCell value="2" minValue="2" maxValue="2" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="100.0000 %" minValue="1" maxValue="1" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="30.6000 %" minValue="0.306" maxValue="0.306" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="2" minValue="2" maxValue="2" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="30.6000 % w/w" minValue="0.306" maxValue="0.306" />
                    <tableCell value="30.6000 %" minValue="0.306" maxValue="0.306" />
                    <tableCell value="30.6000 %" minValue="0.306" maxValue="0.306" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="61.2 g" minValue="0.0612" maxValue="0.0612" foreColor="-16776961" tag="entered" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                  </tableRow>
                </tableSection>
            </object>
            */

            XElement rootElement = new XElement("tableSection");

            int ingredientCount = 0;

            foreach (Ingredient ingredient in formulation.Ingredients.Where(w => w.BlendID == null))
            {
                ++ingredientCount;

                XElement tableRowElement = new XElement("tableRow", new XAttribute("height", "330"), new XAttribute("width", "0"));

                tableRowElement.Add(new XElement("tableCell")); // Lot Container Pair
                if (ingredient.ProductName == null)
                    tableRowElement.Add(new XElement("tableCell")); // Name
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.ProductName))); // Name
                tableRowElement.Add(new XElement("tableCell", new XAttribute("value", "1"), new XAttribute("minValue", "1"), new XAttribute("maxValue", "1"))); // Materials Step
                if (ingredient.AdditionOrder == null)
                    tableRowElement.Add(new XElement("tableCell")); // Addition Order
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.AdditionOrder))); // Addition Order
                tableRowElement.Add(new XElement("tableCell")); // Materials Percent Volume of Total
                tableRowElement.Add(new XElement("tableCell")); // Materials wt/wt of Total
                tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredientCount), new XAttribute("minValue", ingredientCount), new XAttribute("maxValue", ingredientCount))); // Materials Stage Number
                if (ingredient.SafetyCode1 == null)
                    tableRowElement.Add(new XElement("tableCell")); // Safety Code 1
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.SafetyCode1))); // Safety Code 1
                if (ingredient.SafetyCode2 == null)
                    tableRowElement.Add(new XElement("tableCell")); // Safety Code 2
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.SafetyCode2))); // Safety Code 2
                tableRowElement.Add(new XElement("tableCell")); // Container Updated
                tableRowElement.Add(new XElement("tableCell")); // Materials Nitrogen Content
                tableRowElement.Add(new XElement("tableCell")); // Materials Nitrogen Contribution
                tableRowElement.Add(new XElement("tableCell")); // Materials Safety Code 1 (Not used)
                tableRowElement.Add(new XElement("tableCell")); // Materials Safety Code 2 (Not used)
                tableRowElement.Add(new XElement("tableCell")); // Materials Phosphorus Content
                tableRowElement.Add(new XElement("tableCell")); // Materials Purity
                if (ingredient.InventoryContainerID == null)
                    tableRowElement.Add(new XElement("tableCell")); // Materials Container ID
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.InventoryContainerID))); // Materials Container ID
                tableRowElement.Add(new XElement("tableCell")); // Materials Phosphorus Contribution
                tableRowElement.Add(new XElement("tableCell")); // Materials Sulfur Content
                if (ingredient.InventoryLotID == null)
                    tableRowElement.Add(new XElement("tableCell")); // Materials Lot ID
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.InventoryLotID))); // Materials Lot ID
                if (ingredient.InventoryContainerID == null)
                    tableRowElement.Add(new XElement("tableCell")); // Materials Container Number
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.InventoryContainerID))); // Materials Container Number
                tableRowElement.Add(new XElement("tableCell")); // Materials Sulfur Contribution
                tableRowElement.Add(new XElement("tableCell")); // Materials Designed Treat Rate
                if (ingredient.TreatRate == null)
                    tableRowElement.Add(new XElement("tableCell")); // Materials Treat Rate
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.TreatRate + " %"), new XAttribute("minValue", ingredient.TreatRate / 100.0), new XAttribute("maxValue", ingredient.TreatRate / 100.0))); // Materials Treat Rate
                tableRowElement.Add(new XElement("tableCell")); // Materials Base Oil Group
                if (ingredient.MSDS == null)
                    tableRowElement.Add(new XElement("tableCell")); // MSDS
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.MSDS))); // MSDS
                tableRowElement.Add(new XElement("tableCell")); // Materials Molecular Weight
                tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredientCount), new XAttribute("minValue", ingredientCount), new XAttribute("maxValue", ingredientCount))); // Material ID
                tableRowElement.Add(new XElement("tableCell")); // Materials Fluid Code
                tableRowElement.Add(new XElement("tableCell")); // Materials FC Mod
                tableRowElement.Add(new XElement("tableCell")); // Materials FC Number
                tableRowElement.Add(new XElement("tableCell")); // Materials FC Prefix
                tableRowElement.Add(new XElement("tableCell")); // Materials FC Rev
                tableRowElement.Add(new XElement("tableCell")); // Materials Status
                tableRowElement.Add(new XElement("tableCell")); // Materials Expiration Date
                tableRowElement.Add(new XElement("tableCell")); // Materials X-Number Alias
                if (ingredient.Flammability == null)
                    tableRowElement.Add(new XElement("tableCell")); // HMIS_F
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.Flammability))); // HMIS_F
                if (ingredient.Health == null)
                    tableRowElement.Add(new XElement("tableCell")); // HMIS_H
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.Health))); // HMIS_H
                if (ingredient.Manufacturer == null)
                    tableRowElement.Add(new XElement("tableCell")); // Manufacturer
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.Manufacturer))); // Manufacturer
                if (ingredient.OnTSCA == null)
                    tableRowElement.Add(new XElement("tableCell")); // OnTSCA
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.OnTSCA))); // OnTSCA
                tableRowElement.Add(new XElement("tableCell")); // Materials Research Aliases
                if (ingredient.ShelfLifeInDays == null)
                    tableRowElement.Add(new XElement("tableCell")); // Material Shelf Life
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.ShelfLifeInDays))); // Material Shelf Life
                tableRowElement.Add(new XElement("tableCell")); // Materials Master Lot?
                tableRowElement.Add(new XElement("tableCell")); // Materials Material Type
                if (ingredient.ProtectiveEquipment == null)
                    tableRowElement.Add(new XElement("tableCell")); // HMIS_PE
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.ProtectiveEquipment))); // HMIS_PE
                if (ingredient.Reactivity == null)
                    tableRowElement.Add(new XElement("tableCell")); // HMIS_R
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.Reactivity))); // HMIS_R
                tableRowElement.Add(new XElement("tableCell")); // Materials Genre
                tableRowElement.Add(new XElement("tableCell")); // Materials HiTEC Alias
                tableRowElement.Add(new XElement("tableCell")); // Materials Formula
                if (ingredient.InventoryLotNumber == null)
                    tableRowElement.Add(new XElement("tableCell")); // Lot #
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.InventoryLotNumber))); // Lot #
                tableRowElement.Add(new XElement("tableCell")); // Materials Flash Point
                if (ingredient.Notes == null)
                    tableRowElement.Add(new XElement("tableCell")); // Materials Description
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.Notes))); // Materials Description
                tableRowElement.Add(new XElement("tableCell")); // Materials Champion
                tableRowElement.Add(new XElement("tableCell")); // Materials HS&amp;E Caution
                tableRowElement.Add(new XElement("tableCell")); // Materials Toxicology
                tableRowElement.Add(new XElement("tableCell")); // Materials Role
                tableRowElement.Add(new XElement("tableCell")); // Chemical Structure
                if (ingredient.Density == null)
                    tableRowElement.Add(new XElement("tableCell")); // Materials Density
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.Density))); // Materials Density
                tableRowElement.Add(new XElement("tableCell")); // Materials Percent Active
                tableRowElement.Add(new XElement("tableCell")); // Materials Cost/Mass
                tableRowElement.Add(new XElement("tableCell")); // Materials Cost/Amount
                tableRowElement.Add(new XElement("tableCell")); // Materials Percent Mass
                tableRowElement.Add(new XElement("tableCell")); // Materials Percent Mass of Total
                tableRowElement.Add(new XElement("tableCell")); // Materials Percent Mass Total Material
                tableRowElement.Add(new XElement("tableCell")); // Materials Batch Mass Planned
                tableRowElement.Add(new XElement("tableCell")); // Materials Unit Volume Planned
                tableRowElement.Add(new XElement("tableCell")); // Materials Inventory ID
                if (ingredient.Mass == null)
                    tableRowElement.Add(new XElement("tableCell")); // Materials Unit Mass Planned
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.Mass + " g"), new XAttribute("minValue", ingredient.Mass / 1000.0), new XAttribute("maxValue", ingredient.Mass / 1000.0))); // Materials Unit Mass Planned
                if (ingredient.Supplier == null)
                    tableRowElement.Add(new XElement("tableCell")); // Supplier
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.Supplier))); // Supplier
                tableRowElement.Add(new XElement("tableCell")); // Materials Batch Volume Planned
                tableRowElement.Add(new XElement("tableCell")); // Materials Formula Mass
                tableRowElement.Add(new XElement("tableCell")); // Materials Molarity
                tableRowElement.Add(new XElement("tableCell")); // Materials Batch Mass Actual
                tableRowElement.Add(new XElement("tableCell")); // Materials Batch Mass Actual Active
                tableRowElement.Add(new XElement("tableCell")); // Materials Batch Volume Actual
                tableRowElement.Add(new XElement("tableCell")); // Materials Percent Mass Actual
                tableRowElement.Add(new XElement("tableCell")); // Materials Mass/Vol
                tableRowElement.Add(new XElement("tableCell")); // Materials CAS
                tableRowElement.Add(new XElement("tableCell")); // Materials Material Mass/Vol
                tableRowElement.Add(new XElement("tableCell")); // Materials Percent Mass of Total Actual
                tableRowElement.Add(new XElement("tableCell")); // Materials Material Molarity
                tableRowElement.Add(new XElement("tableCell")); // Materials Vol/Vol
                tableRowElement.Add(new XElement("tableCell")); // Acute Toxicity
                tableRowElement.Add(new XElement("tableCell")); // Carcinogenicity
                tableRowElement.Add(new XElement("tableCell")); // Eye Effects
                if (ingredient.OnCOSSH == null)
                    tableRowElement.Add(new XElement("tableCell")); // Materials On COSSH
                else
                    tableRowElement.Add(new XElement("tableCell", new XAttribute("value", ingredient.OnCOSSH))); // Materials On COSSH
                tableRowElement.Add(new XElement("tableCell")); // Physical State
                tableRowElement.Add(new XElement("tableCell")); // Sensitizers
                tableRowElement.Add(new XElement("tableCell")); // Skin Corrosion
                tableRowElement.Add(new XElement("tableCell")); // TOST: Single Exposure
                tableRowElement.Add(new XElement("tableCell")); // TOST : Repeated Exposure
                tableRowElement.Add(new XElement("tableCell")); // Toxicity Levels

                rootElement.Add(tableRowElement);
            }

            return rootElement.Descendants("tableRow");
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: datablueprint/ELNMigration
        private XDocument GetFormulationDocument(Formulation formulation)
        {
            XDocument formulationDocument = new XDocument(_formulationDocumentTemplate);

            formulationDocument.Root.Attribute("name").Value = formulation.MaterialName;

            var metadata1Element = from e1 in formulationDocument.Root.Elements("sectionSetView").Elements("section").Elements("object").Elements("field")
                                   where e1.Attribute("name").Value == "Metadata1"
                                   select e1;

            var metadata2Element = from e1 in formulationDocument.Root.Elements("sectionSetView").Elements("section").Elements("object").Elements("field")
                                   where e1.Attribute("name").Value == "Metadata2"
                                   select e1;

            var descriptionElement = from e1 in formulationDocument.Root.Elements("sectionSetView").Elements("section").Elements("object").Elements("field")
                                     where e1.Attribute("name").Value == "Description"
                                     select e1;

            var healthAndSafetyElement = from e1 in formulationDocument.Root.Elements("sectionSetView").Elements("section")
                                         where e1.Attribute("name").Value == "Environmental Health & Safety"
                                         select e1;

            var formulationMaterialsStepTableRowElement = from e1 in formulationDocument.Root.Elements("sectionSetView").Elements("section").Elements("object").Elements("tableSection").Elements("tableRow")
                                                          where e1.Parent.ElementsBeforeSelf("field").First().Attribute("name").Value == "Steps"
                                                          select e1;

            var formulationMaterialsTableRowElement = from e1 in formulationDocument.Root.Elements("sectionSetView").Elements("section").Elements("object").Elements("tableSection")
                                                          where e1.ElementsBeforeSelf("field").First().Attribute("name").Value == "Materials"
                                                          select e1;
            formulationMaterialsTableRowElement.First().Attribute("rowCount").Value = formulation.Ingredients.Count.ToString();

            XElement formulationMetadata1XML = XMLTools.GetFormulationMetadata1XML(formulation);
            XElement formulationMetadata2XML = XMLTools.GetFormulationMetadata2XML(formulation);
            XElement formulationDescriptionXML = XMLTools.GetFormulationDescriptionXML(formulation);
            IEnumerable<XElement> healthAndSafetyXMLElements = XMLTools.GetFormulationHealthAndSafetyXML(formulation);
            IEnumerable<XElement> formulationMaterialsStepXML = XMLTools.GetFormulationMaterialsStepXML(formulation);
            IEnumerable<XElement> formulationMaterialsXML = XMLTools.GetFormulationMaterialsXML(formulation);

            metadata1Element.First().Parent.Add(formulationMetadata1XML);
            metadata2Element.First().Parent.Add(formulationMetadata2XML);
            descriptionElement.First().Parent.Add(formulationDescriptionXML);
            foreach (XElement element in healthAndSafetyXMLElements)
            {
                healthAndSafetyElement.First().Add(element);
            }
            foreach (XElement element in formulationMaterialsStepXML)
            {
                formulationMaterialsStepTableRowElement.First().Add(element);
            }

            foreach (XElement element in formulationMaterialsXML)
            {
                formulationMaterialsTableRowElement.First().Add(element);
            }

            return formulationDocument;
        }
コード例 #3
0
        public static IEnumerable<XElement> GetFormulationHealthAndSafetyXML(Formulation formulation)
        {
            XElement rootElement = new XElement("root");

            rootElement.Add(new XElement("object",
                                new XElement("field", new XAttribute("name", "Health Cautions")),
                                new XElement("propertyInstances",
                                        GetPropertyInstance("CoA", "CoA PLACEHOLDER"),
                                        GetPropertyInstance("Health Caution", formulation.HealthCaution),
                                        GetPropertyInstance("MSDS", formulation.MSDS))));

            rootElement.Add(new XElement("object",
                                new XElement("field", new XAttribute("name", "Comment")),
                                new XElement("styledText",
                                    new XElement("data"),
                                    new XElement("text"))));

            rootElement.Add(new XElement("object",
                                new XElement("field", new XAttribute("name", "Global")),
                                new XElement("propertyInstances",
                                    GetPropertyInstance("Acute Toxicity", ""),
                                    GetPropertyInstance("Carcinogenicity", ""),
                                    GetPropertyInstance("Eye Effects", ""),
                                    GetPropertyInstance("Physical State", ""),
                                    GetPropertyInstance("Sensitizers", ""),
                                    GetPropertyInstance("Skin Corrosion", ""),
                                    GetPropertyInstance("TOST: Single Exposure", ""),
                                    GetPropertyInstance("TOST: Repeated Exposure", ""),
                                    GetPropertyInstance("Toxicity Levels", ""))));

            rootElement.Add(new XElement("object",
                                new XElement("field", new XAttribute("name", "HMIS")),
                                new XElement("propertyInstances",
                                    GetPropertyInstance("Flammability", formulation.Flammability),
                                    GetPropertyInstance("Health", formulation.Health),
                                    GetPropertyInstance("On TSCA", formulation.OnTSCA),
                                    GetPropertyInstance("Personal Protective Equipment", formulation.ProtectiveEquipment),
                                    GetPropertyInstance("Reactivity", formulation.Reactivity))));

            rootElement.Add(new XElement("object",
                                new XElement("field", new XAttribute("name", "England (COSHH)")),
                                new XElement("propertyInstances",
                                    GetPropertyInstance("On COSSH", (formulation.OnCOSSH != null && (bool)formulation.OnCOSSH ? "Y" : "N")),
                                    GetPropertyInstance("Safety Code 1", formulation.Bracknell1),
                                    GetPropertyInstance("Safety Code 2", formulation.Bracknell2))));

            rootElement.Add(new XElement("object",
                                new XElement("field", new XAttribute("name", "Asia (METI)")),
                                new XElement("propertyInstances",
                                    GetPropertyInstance("Flammibility Codes", formulation.MITI_F),
                                    GetPropertyInstance("Corrosivity Codes", formulation.MITI_C))));

            rootElement.Add(new XElement("object",
                                new XElement("field", new XAttribute("name", "Additional Health Cautions")),
                                new XElement("propertyInstances",
                                    GetPropertyInstance("Health Caution Additional", ""),
                                    GetPropertyInstance("Health Caution Additional", ""),
                                    GetPropertyInstance("Health Caution Additional", ""),
                                    GetPropertyInstance("MSDS Additional", ""))));

            return rootElement.Descendants("object");
        }
コード例 #4
0
        public static IEnumerable<XElement> GetFormulationMaterialsStepXML(Formulation formulation)
        {
            /*
            <object>
                <field name="Steps" />
                <tableSection pivotType="1" propertyCount="21" rowCount="1">
                    <elementTags layout="&lt;XtraSerializer version=&quot;1.0&quot; application=&quot;View&quot;&gt;&lt;property name=&quot;#LayoutVersion&quot; /&gt;&lt;property name=&quot;ActiveFilterEnabled&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Columns&quot; iskey=&quot;true&quot; value=&quot;20&quot;&gt;&lt;property name=&quot;Item1&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;0&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn1&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item2&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;1&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn2&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item3&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;2&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn3&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item4&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;3&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn4&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item5&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;4&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn5&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item6&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;5&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn6&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item7&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;6&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn7&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item8&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;7&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Width&quot;&gt;86&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn8&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item9&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;8&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn9&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item10&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;9&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn10&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item11&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;10&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn11&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item12&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;11&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn12&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item13&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;12&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn13&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item14&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;13&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn14&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item15&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;14&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn15&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item16&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;15&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn16&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item17&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;16&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn17&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item18&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;17&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn18&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item19&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;18&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn19&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;Item20&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;VisibleIndex&quot;&gt;19&lt;/property&gt;&lt;property name=&quot;Visible&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;Width&quot;&gt;36&lt;/property&gt;&lt;property name=&quot;Name&quot;&gt;colColumn20&lt;/property&gt;&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;OptionsView&quot; isnull=&quot;true&quot; iskey=&quot;true&quot;&gt;&lt;property name=&quot;ShowGroupPanel&quot;&gt;false&lt;/property&gt;&lt;property name=&quot;EnableAppearanceOddRow&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;EnableAppearanceEvenRow&quot;&gt;true&lt;/property&gt;&lt;property name=&quot;ColumnAutoWidth&quot;&gt;false&lt;/property&gt;&lt;property name=&quot;NewItemRowPosition&quot;&gt;Bottom&lt;/property&gt;&lt;property name=&quot;RowAutoHeight&quot;&gt;true&lt;/property&gt;&lt;/property&gt;&lt;property name=&quot;ActiveFilterString&quot; /&gt;&lt;property name=&quot;GroupSummarySortInfoState&quot; /&gt;&lt;/XtraSerializer&gt;" options="&lt;options /&gt;" />
                    <tableProperty height="0" width="555" visible="true">
                    <property name="Steps Step" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Steps Step&quot; keyField=&quot;True&quot; /&gt;" />
                    </tableProperty>
                    <tableProperty height="0" width="570" visible="true">
                    <property name="Steps UCID" />
                    </tableProperty>
                    <tableProperty height="0" width="645" visible="true">
                    <property name="Name" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Name&quot; /&gt;" />
                    </tableProperty>
                    <tableProperty height="0" width="1425" visible="true">
                    <property name="Steps Total Phosphorus" />
                    </tableProperty>
                    <tableProperty height="0" width="990" visible="true">
                    <property name="Steps Total Sulfur" />
                    </tableProperty>
                    <tableProperty height="0" width="1680" visible="true">
                    <property name="Steps Description" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Description&quot; /&gt;" />
                    </tableProperty>
                    <tableProperty height="0" width="945" visible="true">
                    <property name="Steps Treat Rate" />
                    </tableProperty>
                    <tableProperty height="0" width="1125" visible="true">
                    <property name="Steps Temperature" />
                    </tableProperty>
                    <tableProperty height="0" width="1185" visible="true">
                    <property name="Steps Total Nitrogen" />
                    </tableProperty>
                    <tableProperty height="0" width="540" visible="true">
                    <property name="Steps Cost" />
                    </tableProperty>
                    <tableProperty height="0" width="885" visible="true">
                    <property name="Steps Mass Ratio" />
                    </tableProperty>
                    <tableProperty height="0" width="1170" visible="true">
                    <property name="Steps Volume Ratio" />
                    </tableProperty>
                    <tableProperty height="0" width="1815" visible="true">
                    <property name="Steps Unit Mass Planned" />
                    </tableProperty>
                    <tableProperty height="0" width="735" visible="true">
                    <property name="Steps Primary" />
                    </tableProperty>
                    <tableProperty height="0" width="1575" visible="true">
                    <property name="Steps Unit Volume Planned" />
                    </tableProperty>
                    <tableProperty height="0" width="1935" visible="true">
                    <property name="Steps Batch Mass Planned" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Batch Mass Planned&quot; /&gt;" />
                    </tableProperty>
                    <tableProperty height="0" width="1920" visible="true">
                    <property name="Steps Batch Mass Actual" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Batch Mass Act.&quot; /&gt;" />
                    </tableProperty>
                    <tableProperty height="0" width="1620" visible="true">
                    <property name="Steps Batch Volume Planned" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Batch Vol Planned&quot; /&gt;" />
                    </tableProperty>
                    <tableProperty height="0" width="1620" visible="true">
                    <property name="Steps Batch Volume Actual" />
                    <elementTags fieldData="&lt;fieldData name=&quot;Batch Vol Act.&quot; /&gt;" />
                    </tableProperty>
                    <tableProperty height="0" width="1530" visible="true">
                    <property name="Steps Percent Mass of Total" />
                    <elementTags fieldData="&lt;fieldData name=&quot;% w/w of Total&quot; /&gt;" />
                    </tableProperty>
                    <tableProperty height="0" width="0" visible="true">
                    <property name="Steps pH" />
                    </tableProperty>
                    <tableRow height="330" width="0">
                    <tableCell value="1" minValue="1" maxValue="1" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="100.0000 %" minValue="1" maxValue="1" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="100.0000 %" minValue="1" maxValue="1" />
                    <tableCell />
                    <tableCell value="200 g" minValue="0.2" maxValue="0.2" foreColor="-16776961" tag="entered" />
                    <tableCell />
                    <tableCell />
                    <tableCell value="0.0000 µg" minValue="0" maxValue="0" />
                    <tableCell />
                    <tableCell />
                    <tableCell />
                    <tableCell value="100.0000 % w/w" minValue="1" maxValue="1" />
                    <tableCell />
                    </tableRow>
                </tableSection>
            </object>
            */
            XElement rootElement = new XElement("tableRow");

            rootElement.Add(new XElement("tableCell", new XAttribute("value", "1"), new XAttribute("minValue", "1"), new XAttribute("maxValue", "1")));         // Steps Step
            rootElement.Add(new XElement("tableCell"));                                                                                                         // Steps UCID
            rootElement.Add(new XElement("tableCell"));                                                                                                         // Name
            rootElement.Add(new XElement("tableCell"));    // Steps Total Phosphorus
            rootElement.Add(new XElement("tableCell"));    // Steps Total Sulfur
            rootElement.Add(new XElement("tableCell"));    // Steps Description
            rootElement.Add(new XElement("tableCell", new XAttribute("value", formulation.FinishedFluidTreatRate + " %"), new XAttribute("minValue", formulation.FinishedFluidTreatRate / 100.0), new XAttribute("maxValue", formulation.FinishedFluidTreatRate / 100.0)));    // Steps Treat Rate
            rootElement.Add(new XElement("tableCell"));    // Steps Temperature
            rootElement.Add(new XElement("tableCell"));    // Steps Total Nitrogen
            rootElement.Add(new XElement("tableCell"));    // Steps Cost
            rootElement.Add(new XElement("tableCell"));    // Steps Mass Ratio
            rootElement.Add(new XElement("tableCell"));    // Steps Volume Ratio
            rootElement.Add(new XElement("tableCell", new XAttribute("value", formulation.StepMass + " " + formulation.Unit.ToLower()), new XAttribute("minValue", formulation.StepMass / 1000.0), new XAttribute("maxValue", formulation.StepMass / 1000.0), new XAttribute("foreColor", "-16776961"), new XAttribute("tag", "entered")));    // Steps Unit Mass Planned
            rootElement.Add(new XElement("tableCell"));    // Steps Primary
            rootElement.Add(new XElement("tableCell"));    // Steps Unit Volume Planned
            rootElement.Add(new XElement("tableCell"));    // Steps Batch Mass Planned
            rootElement.Add(new XElement("tableCell"));    // Steps Batch Mass Actual
            rootElement.Add(new XElement("tableCell"));    // Steps Batch Volume Planned
            rootElement.Add(new XElement("tableCell"));    // Steps Batch Volume Actual
            rootElement.Add(new XElement("tableCell"));    // Steps Percent Mass of Total
            rootElement.Add(new XElement("tableCell"));    // Steps pH

            return rootElement.Descendants("tableCell");
        }
コード例 #5
0
        public static XElement GetFormulationDescriptionXML(Formulation formulation)
        {
            XElement rootElement = new XElement("styledText");

            if (formulation != null)
            {
                rootElement.Add(new XElement("data", formulation.Description),
                                new XElement("text", formulation.Description));
            }

            return rootElement;
        }
コード例 #6
0
        public static XElement GetFormulationMetadata2XML(Formulation formulation)
        {
            XElement rootElement = new XElement("propertyInstances");

            rootElement.Add(GetPropertyInstance("Product Line", formulation.ProductLine));
            rootElement.Add(GetPropertyInstance("Product Name", formulation.ProductName1));
            rootElement.Add(GetPropertyInstance("Product Type", formulation.ProductType));
            rootElement.Add(GetPropertyInstance("Shelf Life (Months)", formulation.ShelfLife.ToString()));
            rootElement.Add(GetPropertyInstance("Expiration Date", "EXPIRATION DATE PLACEHOLDER"));
            rootElement.Add(GetPropertyInstance("Formulation Code", "FORMULATION CODE PLACEHOLDER"));
            rootElement.Add(GetPropertyInstance("Material Code", formulation.MaterialName));
            rootElement.Add(GetPropertyInstance("Created by", formulation.CreatedBy));
            rootElement.Add(GetPropertyInstance("Date Created", formulation.DateCreated.ToString()));
            rootElement.Add(GetPropertyInstance("Modified By", formulation.ModifiedBy));
            rootElement.Add(GetPropertyInstance("Date Modified", formulation.DateModified.ToString()));
            rootElement.Add(GetPropertyInstance("Actual Blend Date", "ACTUAL BLEND DATE PLACEHOLDER - PROBABLY NOT NEEDED"));
            rootElement.Add(GetPropertyInstance("Blend Device", "BLEND DEVICE PLACEHOLDER - PROBABLY NOT NEEDED"));
            rootElement.Add(GetPropertyInstance("Blended By ", "BLENDED BY PLACEHOLDER - PROBABLY NOT NEEDED"));
            rootElement.Add(GetPropertyInstance("Viscosity Grade", formulation.ViscosityGrade));
            rootElement.Add(GetPropertyInstance("Date Required", "DATE REQUIRED PLACEHOLDER - PROBABLY NOT NEEDED"));
            rootElement.Add(GetPropertyInstance("Pitch Date", formulation.PitchDate.ToString()));

            return rootElement;
        }
コード例 #7
0
        public static XElement GetFormulationMetadata1XML(Formulation formulation)
        {
            XElement rootElement = new XElement("propertyInstances");

            rootElement.Add(GetPropertyInstance("Experiment Title", formulation.MaterialName));
            rootElement.Add(GetPropertyInstance("Research Name", formulation.MaterialName));
            rootElement.Add(GetPropertyInstance("Department", "DEPARTMENT PLACEHOLDER"));
            rootElement.Add(GetPropertyInstance("SBU", "SBU PLACEHOLDER"));
              	        rootElement.Add(GetPropertyInstance("Cost Center", formulation.CostCenter));
              	        rootElement.Add(GetPropertyInstance("Site", formulation.RequestersSite));
              	        rootElement.Add(GetPropertyInstance("User Full Name", "USER FULL NAME PLACEHOLDER"));
              	        rootElement.Add(GetPropertyInstance("Requested For", formulation.RequestedBy));
              	        rootElement.Add(GetPropertyInstance("Project Number", formulation.ProjectNumber));
              	        rootElement.Add(GetPropertyInstance("Project Name", "PROJECT NAME PLACEHOLDER"));
              	        rootElement.Add(GetPropertyInstance("Subproject Number", formulation.SubprojectNumber));
              	        rootElement.Add(GetPropertyInstance("Experiment Keyword", "EXPERIMENT KEYWORD PLACEHOLDER"));
              	        rootElement.Add(GetPropertyInstance("Comment", formulation.Comments));
              	        rootElement.Add(GetPropertyInstance("Supervisor", "SUPERVISOR PLACEHOLDER"));
              	        rootElement.Add(GetPropertyInstance("Customer", formulation.Customer));

            return rootElement;
        }
コード例 #8
0
 /// <summary>
 /// Create a new Formulation object.
 /// </summary>
 /// <param name="formulationID">Initial value of the FormulationID property.</param>
 /// <param name="requestCode">Initial value of the RequestCode property.</param>
 /// <param name="formulationStatusID">Initial value of the FormulationStatusID property.</param>
 public static Formulation CreateFormulation(global::System.Int32 formulationID, global::System.String requestCode, global::System.Int32 formulationStatusID)
 {
     Formulation formulation = new Formulation();
     formulation.FormulationID = formulationID;
     formulation.RequestCode = requestCode;
     formulation.FormulationStatusID = formulationStatusID;
     return formulation;
 }
コード例 #9
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Formulations EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToFormulations(Formulation formulation)
 {
     base.AddObject("Formulations", formulation);
 }