123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- using System;
- using System.Collections.Generic;
- using System.Windows;
- using Comal.Classes;
- using InABox.Core;
- using InABox.DynamicGrid;
- namespace PRSDesktop;
- public partial class ProgressClaimWindow : Window
- {
- public Guid JobID
- {
- get => Grid.JobID;
- set => Grid.JobID = value;
- }
-
- public Guid InvoiceID
- {
- get => Grid.InvoiceID;
- set => Grid.InvoiceID = value;
- }
- public List<ProgressClaim> Items => Grid.Items;
- public double Retained => Grid.CurrentRetention;
-
- public ProgressClaimWindow(Guid jobid, Guid invoiceid)
- {
- InitializeComponent();
- JobID = jobid;
- InvoiceID = invoiceid;
-
- Grid.Refresh(true, true);
-
- }
-
- private void Cancel_Click(object sender, RoutedEventArgs e)
- {
- DialogResult = false;
- }
- private void OK_Click(object sender, RoutedEventArgs e)
- {
- DialogResult = true;
- }
- private void Grid_OnChanged(object? sender, EventArgs e)
- {
- UpdateTotals();
- }
- private void Grid_OnAfterRefresh(object sender, AfterRefreshEventArgs args)
- {
- UpdateTotals();
- }
- private void UpdateTotals()
- {
- ProjectContract.Text = $"{Grid.ProjectContract:F2}";
- ProjectVariations.Text = $"{Grid.ProjectVariations:F2}";
- ProjectSubTotal.Text = $"{Grid.ProjectSubTotal:F2}";
- ProjectRetention.Text = $"{Grid.ProjectRetention:F2}";
- ProjectRetentionPercent.Text = $"{Grid.ProjectRetentionPercent:F2}";
- ProjectTotal.Text = $"{Grid.ProjectTotal:F2}";
-
- CompletedContract.Text = $"{Grid.CompletedContract:F2}";
- CompletedContractPercent.Text = $"{Grid.CompletedContractPercent:F2}";
- CompletedVariations.Text = $"{Grid.CompletedVariations:F2}";
- CompletedVariationsPercent.Text = $"{Grid.CompletedVariationsPercent:F2}";
- CompletedSubTotal.Text = $"{Grid.CompletedSubTotal:F2}";
- CompletedSubTotalPercent.Text = $"{Grid.CompletedSubTotalPercent:F2}";
- CompletedRetention.Text = $"{Grid.CompletedRetention:F2}";
- CompletedRetentionPercent.Text = $"{Grid.CompletedRetentionPercent:F2}";
- CompletedTotal.Text = $"{Grid.CompletedTotal:F2}";
- CompletedTotalPercent.Text = $"{Grid.CompletedTotalPercent:F2}";
-
- PreviousContract.Text = $"{Grid.PreviousContract:F2}";
- PreviousContractPercent.Text = $"{Grid.PreviousContractPercent:F2}";
- PreviousVariations.Text = $"{Grid.PreviousVariations:F2}";
- PreviousVariationsPercent.Text = $"{Grid.PreviousVariationsPercent:F2}";
- PreviousSubTotal.Text = $"{Grid.PreviousSubTotal:F2}";
- PreviousSubTotalPercent.Text = $"{Grid.PreviousSubTotalPercent:F2}";
- PreviousRetention.Text = $"{Grid.PreviousRetention:F2}";
- PreviousRetentionPercent.Text = $"{Grid.PreviousRetentionPercent:F2}";
- PreviousTotal.Text = $"{Grid.PreviousTotal:F2}";
- PreviousTotalPercent.Text = $"{Grid.PreviousTotalPercent:F2}";
-
- CurrentContract.Text = $"{Grid.CurrentContract:F2}";
- CurrentContractPercent.Text = $"{Grid.CurrentContractPercent:F2}";
- CurrentVariations.Text = $"{Grid.CurrentVariations:F2}";
- CurrentVariationsPercent.Text = $"{Grid.CurrentVariationsPercent:F2}";
- CurrentSubTotal.Text = $"{Grid.CurrentSubTotal:F2}";
- CurrentSubTotalPercent.Text = $"{Grid.CurrentSubTotalPercent:F2}";
- CurrentRetention.Text = $"{Grid.CurrentRetention:F2}";
- CurrentRetentionPercent.Text = $"{Grid.CurrentRetentionPercent:F2}";
- CurrentTotal.Text = $"{Grid.CurrentTotal:F2}";
- CurrentTotalPercent.Text = $"{Grid.CurrentTotalPercent:F2}";
- }
- }
|