Exemplo n.º 1
0
        /// <summary>
        /// Provides the description of the model settings for summary (GetFullSummary)
        /// </summary>
        /// <param name="formatForParentControl">Use full verbose description</param>
        /// <returns></returns>
        public override string ModelSummary(bool formatForParentControl)
        {
            string html = "";

            html += "\n<div class=\"activityentry\">Individuals are weaned at ";
            if (Style == WeaningStyle.AgeOrWeight | Style == WeaningStyle.AgeOnly)
            {
                html += "<span class=\"setvalue\">" + WeaningAge.ToString("#0.#") + "</span> months";
                if (Style == WeaningStyle.AgeOrWeight)
                {
                    html += " or  ";
                }
            }
            if (Style == WeaningStyle.AgeOrWeight | Style == WeaningStyle.WeightOnly)
            {
                html += "<span class=\"setvalue\">" + WeaningWeight.ToString("##0.##") + "</span> kg";
            }
            html += "</div>";
            html += "\n<div class=\"activityentry\">Weaned individuals will be placed in ";
            if (GrazeFoodStoreName == null || GrazeFoodStoreName == "")
            {
                html += "<span class=\"resourcelink\">Not specified - general yards</span>";
            }
            else
            {
                html += "<span class=\"resourcelink\">" + GrazeFoodStoreName + "</span>";
            }
            html += "</div>";
            // warn if natural weaning will take place

            return(html);
        }
Exemplo n.º 2
0
 /// <inheritdoc/>
 public override string ModelSummary()
 {
     using (StringWriter htmlWriter = new StringWriter())
     {
         htmlWriter.Write("\r\n<div class=\"activityentry\">Individuals are weaned at ");
         if (Style == WeaningStyle.AgeOrWeight | Style == WeaningStyle.AgeOnly)
         {
             htmlWriter.Write("<span class=\"setvalue\">" + WeaningAge.ToString("#0.#") + "</span> months");
             if (Style == WeaningStyle.AgeOrWeight)
             {
                 htmlWriter.Write(" or  ");
             }
         }
         if (Style == WeaningStyle.AgeOrWeight | Style == WeaningStyle.WeightOnly)
         {
             htmlWriter.Write("<span class=\"setvalue\">" + WeaningWeight.ToString("##0.##") + "</span> kg");
         }
         htmlWriter.Write("</div>");
         htmlWriter.Write("\r\n<div class=\"activityentry\">Weaned individuals will be placed in ");
         if (GrazeFoodStoreName == null || GrazeFoodStoreName == "")
         {
             htmlWriter.Write("<span class=\"resourcelink\">Not specified - general yards</span>");
         }
         else
         {
             htmlWriter.Write("<span class=\"resourcelink\">" + GrazeFoodStoreName + "</span>");
         }
         htmlWriter.Write("</div>");
         // warn if natural weaning will take place
         return(htmlWriter.ToString());
     }
 }