XPathNavigator myNav = MainDataSource.CreateNavigator();XPathNodeIterator NodeIterator = myNav.Select("/my:myFFIM_base_table/my:Species_Records/my:SpeciesGroup/my:GROUP_1MM/my:GROUP_1MM_sub", NamespaceManager);
string temp_species = String.Empty;int temp_value = 0;
string species = String.Empty;string CountOneM = String.Empty;
string LengthOneM = String.Empty;string WeightOneM = String.Empty;
string BatchWeightOneM = String.Empty;string Onecm = String.Empty;
double FinalLength = 0;double x = 0;
double TempWeight = 0;double FinalWeight = 0;
double intercept = 0;double slope = 0;
while (NodeIterator.MoveNext())
{
myNode = NodeIterator.Current.CreateNavigator();
XPathNavigator group1CM = myNode.SelectSingleNode("../../my:GROUP_1CM", NamespaceManager);
XPathNavigator countOnecm = group1CM.SelectSingleNode("my:group9/my:COUNT_1CM", NamespaceManager);CountOneM = myNode.SelectSingleNode("my:COUNT_1MM", NamespaceManager).Value;
LengthOneM = myNode.SelectSingleNode(
"my:TOTAL_LENGTH_1MM", NamespaceManager).Value; WeightOneM = myNode.SelectSingleNode("my:TOTAL_WEIGHT_1MM", NamespaceManager).Value;species = myNode.SelectSingleNode("../../my:SPECIES_ID", NamespaceManager).Value;
switch (species)
{
case "139203":DoWrite("<p><strong>1 cm count</strong></p>" + countOnecm);
temp_species = "Bluegill - BLUE";
intercept = 4.04899;
slope = 2.72044;
temp_value = EmptyFields(temp_species, CountOneM, LengthOneM, WeightOneM);
if (temp_value == 0)
{
}
elseif (Convert.ToDouble(LengthOneM) < 40 && Convert.ToDouble(WeightOneM) > 8)
{
DoWrite("<p><strong>SPECIES: </strong>" + temp_species);DoWrite("<FONT COLOR = FF3333<strong>Weight is out of range ( length < 40mm and weight > 8 g) </strong></p></FONT>");
}
else if (Convert.ToDouble(LengthOneM) > 40 && Convert.ToDouble(LengthOneM) <80 && Convert.ToDouble(WeightOneM) > 20)
{
DoWrite("<p><strong>SPECIES: </strong>" + temp_species);DoWrite("<FONT COLOR = FF3333<strong>Weight is out of range ( length 40mm-80mm and weight > 20g) </strong></p></FONT>");
}
else
CheckRatio(temp_species, intercept, slope, LengthOneM, WeightOneM, CountOneM);
break; ....
thanks again.