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\">Pasture will be assessed in ";
            if ((int)AssessmentMonth > 0 & (int)AssessmentMonth <= 12)
            {
                html += "<span class=\"setvalue\">";
                html += AssessmentMonth.ToString();
            }
            else
            {
                html += "<span class=\"errorlink\">No month set";
            }
            html += "</span> for a dry season of ";
            if (DrySeasonLength > 0)
            {
                html += "<span class=\"setvalue\">";
                html += DrySeasonLength.ToString("#0");
            }
            else
            {
                html += "<span class=\"errorlink\">No length";
            }
            html += "</span> months ";
            html += "</div>";
            html += "\n<div class=\"activityentry\">The herd will be sold to maintain ";
            html += "<span class=\"setvalue\">";
            html += FeedLowLimit.ToString("#,##0");
            html += "</span> kg/ha at the end of this period";
            html += "</div>";
            return(html);
        }
Exemplo n.º 2
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)
 {
     using (StringWriter htmlWriter = new StringWriter())
     {
         htmlWriter.Write("\r\n<div class=\"activityentry\">Pasture will be assessed in ");
         if ((int)AssessmentMonth > 0 & (int)AssessmentMonth <= 12)
         {
             htmlWriter.Write("<span class=\"setvalue\">");
             htmlWriter.Write(AssessmentMonth.ToString());
         }
         else
         {
             htmlWriter.Write("<span class=\"errorlink\">No month set");
         }
         htmlWriter.Write("</span> for a dry season of ");
         if (DrySeasonLength > 0)
         {
             htmlWriter.Write("<span class=\"setvalue\">");
             htmlWriter.Write(DrySeasonLength.ToString("#0"));
         }
         else
         {
             htmlWriter.Write("<span class=\"errorlink\">No length");
         }
         htmlWriter.Write("</span> months ");
         htmlWriter.Write("</div>");
         htmlWriter.Write("\r\n<div class=\"activityentry\">The herd will be sold to maintain ");
         htmlWriter.Write("<span class=\"setvalue\">");
         htmlWriter.Write(FeedLowLimit.ToString("#,##0"));
         htmlWriter.Write("</span> kg/ha at the end of this period");
         htmlWriter.Write("</div>");
         return(htmlWriter.ToString());
     }
 }