Esempio n. 1
0
    private void CreateAgWFP3PaymentBMPFundingOverviewGrid(int i)
    {
        StringBuilder sb = new StringBuilder();

        try
        {
            using (WACDataClassesDataContext wDataContext = new WACDataClassesDataContext())
            {
                var x = wDataContext.form_wfp3_payment_get_funding_PK(i);
                if (x.Count() > 0)
                {
                    sb.Append("<div class='taC NestedDivReadOnly'>");
                    sb.Append("<div class='fsS B'>Funding History</div>");
                    sb.Append("<center><table cellpadding='5' rules='cols'>");
                    sb.Append("<tr valign='top'>");
                    sb.Append("<td class='B U'>Date</td>");
                    sb.Append("<td class='B U'>BMP</td>");
                    sb.Append("<td class='B U'>Funding Source</td>");
                    sb.Append("<td class='B U'>Funding Agency</td>");
                    sb.Append("<td class='B U'>Version</td>");
                    sb.Append("<td class='B U taR'>Amount</td>");
                    sb.Append("</tr>");
                    foreach (var y in x)
                    {
                        sb.Append("<tr valign='top'>");
                        sb.Append("<td class='taL'>" + WACGlobal_Methods.Format_Global_Date(y.date) + "</td>");
                        sb.Append("<td class='taL'>" + y.CompositBmpNum + "</td>");
                        sb.Append("<td class='taL'>" + y.Funding_Source + "</td>");
                        sb.Append("<td class='taL'>" + y.Funding_Agency + "</td>");
                        sb.Append("<td class='taL'>" + y.Version + "</td>");
                        sb.Append("<td class='taR'>" + WACGlobal_Methods.Format_Global_Currency(y.funding) + "</td>");
                        sb.Append("</tr>");
                    }
                    sb.Append("</table></center>");
                    sb.Append("</div>");
                }
                else
                {
                    sb.Append("<div class='NestedDivLevel00'>No Existing Funding History</div>");
                }
            }
        }
        catch (Exception ex) { sb.Append("Error Creating Funding History Grid: " + ex.Message); }
        Literal litAg_WFP3_Payments_BMPs_Funding_Overview_Grid = pnlSubPanels.FindControl("litAg_WFP3_Payments_BMPs_Funding_Overview_Grid") as Literal;

        if (litAg_WFP3_Payments_BMPs_Funding_Overview_Grid != null)
        {
            litAg_WFP3_Payments_BMPs_Funding_Overview_Grid.Text = sb.ToString();
        }
    }
Esempio n. 2
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();
        }
    }
Esempio n. 3
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();
        }
    }
Esempio n. 4
0
    private void Create_Agriculture_WFP3_PaymentBMP_PaymentStatus_Grid(int iPK_Form_WFP3)
    {
        StringBuilder sb = new StringBuilder();

        try
        {
            using (WACDataClassesDataContext wac = new WACDataClassesDataContext())
            {
                var x = wac.vw_form_wfp3_paymentBMP_paymentStatus.Where(w => w.fk_form_wfp3 == iPK_Form_WFP3).Select(s => s);
                if (x.Count() > 0)
                {
                    sb.Append("<div class='taC NestedDivReadOnly'>");
                    sb.Append("<div class='B fsS'>BMP Payments</div>");
                    sb.Append("<table cellpadding='5' rules='cols' align='center'>");
                    sb.Append("<tr valign='top'><td class='B U'>Payment Date</td><td class='B U'>BMP #</td><td class='B U'>Amount</td><td class='B U'>Amount, Other Agency</td><td class='B U'>Other Agency</td><td class='B U'>Payment Status</td></tr>");
                    foreach (var y in x)
                    {
                        sb.Append("<tr valign='top'>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Date(y.date) + "</td>");
                        sb.Append("<td>" + y.CompositBmpNum + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.amt) + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.amt_agencyFunding) + "</td>");
                        sb.Append("<td>" + y.otherAgencyFunding + "</td>");
                        sb.Append("<td>" + y.status + "</td>");
                        sb.Append("</tr>");
                    }
                    sb.Append("</table>");
                    sb.Append("</div>");
                }
                else
                {
                    sb.Append("<div class='NestedDivLevel00'>No Existing BMP Payments</div>");
                }
            }
        }
        catch (Exception ex) { sb.Append("Error Creating BMP Payments Grid: " + ex.Message); }
        Literal litAg_WFP3_Payments_BMPs_Payments_Overview_Grid = pnlSubPanels.FindControl("litAg_WFP3_Payments_BMPs_Payments_Overview_Grid") as Literal;

        if (litAg_WFP3_Payments_BMPs_Payments_Overview_Grid != null)
        {
            litAg_WFP3_Payments_BMPs_Payments_Overview_Grid.Text = sb.ToString();
        }
    }
Esempio n. 5
0
    private void Create_Agriculture_WFP3_Encumbrance_CurrentlyAssigned_Summary_Grid(int iPK_Form_WFP3)
    {
        StringBuilder sb = new StringBuilder();

        try
        {
            using (WACDataClassesDataContext wac = new WACDataClassesDataContext())
            {
                var x = wac.vw_encumbrance_WFP3s.Where(w => w.pk_form_wfp3 == iPK_Form_WFP3).Select(s => s);
                if (x.Count() > 0)
                {
                    sb.Append("<div class='taC NestedDivReadOnly'>");
                    sb.Append("<div class='B fsS'>Encumbrance History 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'>Encumbrance ID</td><td class='B U'>Amount</td></tr>");
                    foreach (var y in x)
                    {
                        sb.Append("<tr valign='top'>");
                        sb.Append("<td>" + y.encumbrance + "</td>");
                        sb.Append("<td>" + y.encumbrance_id + "</td>");
                        sb.Append("<td>" + WACGlobal_Methods.Format_Global_Currency(y.amt) + "</td>");
                        sb.Append("</tr>");
                    }
                    sb.Append("</table>");
                    sb.Append("</div>");
                }
                else
                {
                    sb.Append("<div class='NestedDivLevel00'>No Currently Assigned Encumbrances</div>");
                }
            }
        }
        catch (Exception ex) { sb.Append("Error Creating Encumbrance History for this Package: " + ex.Message); }
        Literal litAg_WFP3_Encumbrance_CurrentlyAssigned_Grid = pnlSubPanels.FindControl("litAg_WFP3_Encumbrance_CurrentlyAssigned_Grid") as Literal;

        if (litAg_WFP3_Encumbrance_CurrentlyAssigned_Grid != null)
        {
            litAg_WFP3_Encumbrance_CurrentlyAssigned_Grid.Text = sb.ToString();
        }
    }
 private void PopulateFilters()
 {
     ddlFilter_Workload.Items.Clear();
     using (WACDataClassesDataContext wac = new WACDataClassesDataContext())
     {
         var x = wac.agWorkloadFundings.OrderBy(o => o.year).Select(s => s);
         foreach (var y in x)
         {
             string s = y.year + " - " + y.list_agWorkloadFunding.source + " - " + WACGlobal_Methods.Format_Global_Currency(y.amt);
             ddlFilter_Workload.Items.Add(new ListItem(s, y.pk_agWorkloadFunding.ToString()));
         }
         ddlFilter_Workload.Items.Insert(0, new ListItem("[SELECT]", ""));
     }
 }