Example #1
0
    private void Create_Agriculture_WFP3_Basic_Grid(int iPK_Form_WFP3)
    {
        StringBuilder sb = new StringBuilder();

        try
        {
            using (WACDataClassesDataContext wac = new WACDataClassesDataContext())
            {
                //var x = wac.encumbrance_get_basic(null);
                var x = wac.form_wfp3_encumbrance_summary(iPK_Form_WFP3, null);
                if (x.Count() > 0)
                {
                    sb.Append("<div class='taC NestedDivReadOnly'>");
                    sb.Append("<div class='B fsS'>Encumbrance Summary</div>");
                    sb.Append("<table cellpadding='5' rules='cols' align='center'>");
                    sb.Append("<tr valign='top'>");
                    sb.Append("<td class='B U'>Encumbrance</td>");
                    sb.Append("<td class='B U'>Budget</td>");
                    sb.Append("<td class='B U'>Approved</td>");
                    sb.Append("<td class='B U'>Pending</td>");
                    sb.Append("<td class='B U'>Available</td>");
                    sb.Append("</tr>");
                    foreach (var y in x)
                    {
                        sb.Append("<tr valign='top'>");
                        sb.Append("<td>" + y.encumbrance + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.budget) + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.encumbered) + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.encumberedPending) + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.available) + "</td>");
                        sb.Append("</tr>");
                    }
                    sb.Append("</table>");
                    sb.Append("</div>");
                }
                else
                {
                    sb.Append("<div class='NestedDivLevel00'>No Encumbrance Summary Records</div>");
                }
            }
        }
        catch (Exception ex) { sb.Append("Error Creating Encumbrance Summary: " + ex.Message); }
        Literal litAg_WFP3_Basic_Grid = fvAg_WFP3.FindControl("litAg_WFP3_Basic_Grid") as Literal;

        if (litAg_WFP3_Basic_Grid != null)
        {
            litAg_WFP3_Basic_Grid.Text = sb.ToString();
        }
    }
Example #2
0
    private void Create_Agriculture_WFP3_Encumbrance_Possible_Summary_Grid(int iPK_Form_WFP3)
    {
        StringBuilder sb = new StringBuilder();

        try
        {
            using (WACDataClassesDataContext wac = new WACDataClassesDataContext())
            {
                var x = wac.form_wfp3_encumbrance_summary(iPK_Form_WFP3, null);
                if (x.Count() > 0)
                {
                    sb.Append("<div class='taC NestedDivReadOnly'>");
                    sb.Append("<div class='B fsS'>Encumbrance Possibilities for this Package</div>");
                    sb.Append("<table cellpadding='5' rules='cols' align='center'>");
                    sb.Append("<tr valign='top'><td class='B U'>Encumbrance</td><td class='B U'>Budget</td><td class='B U'>Encumbered Currently</td><td class='B U'>Funds Available</td><td class='B U'>Package Cost</td><td class='B U'>Prior Encumbrances on Package</td><td class='B U'>Max Amt of Package to Encumber</td></tr>");
                    foreach (var y in x)
                    {
                        sb.Append("<tr valign='top'>");
                        sb.Append("<td>" + y.encumbrance + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.budget) + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.encumbered) + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.available) + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.packageCost) + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.packageEncumberPrior) + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.packageToEncumber) + "</td>");
                        sb.Append("</tr>");
                    }
                    sb.Append("</table>");
                    sb.Append("</div>");
                }
                else
                {
                    sb.Append("<div class='NestedDivLevel00'>No Possible Encumbrances</div>");
                }
            }
        }
        catch (Exception ex) { sb.Append("Error Creating Encumbrance Possibilities for this Package: " + ex.Message); }
        Literal litAg_WFP3_Encumbrance_Possible_Grid = pnlSubPanels.FindControl("litAg_WFP3_Encumbrance_Possible_Grid") as Literal;

        if (litAg_WFP3_Encumbrance_Possible_Grid != null)
        {
            litAg_WFP3_Encumbrance_Possible_Grid.Text = sb.ToString();
        }
    }