summaryrefslogtreecommitdiff
path: root/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs')
-rw-r--r--src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs b/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs
new file mode 100644
index 0000000..c707956
--- /dev/null
+++ b/src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs
@@ -0,0 +1,59 @@
+using System.Windows.Forms;
+using Cmpp298.Assignment3.Presentation;
+
+namespace Cmpp298.Assignment3.Desktop.UI {
+ public partial class DeleteInvoiceView : Form, IDeleteInvoiceView {
+ private DeleteInvoicePresenter _presenter;
+
+ public DeleteInvoiceView( string invoiceId ) {
+ InitializeComponent( );
+ _presenter = new DeleteInvoicePresenter( invoiceId, this );
+
+ uxCancelButton.Click += delegate { Close( ); };
+ uxDeleteButton.Click += delegate { DeleteAndCloseWindow( ); };
+
+ _presenter.Initialize( );
+ }
+
+ public string VendorName {
+ set { uxVendorNameTextBox.Text = value; }
+ }
+
+ public string InvoiceNumber {
+ set { uxInvoiceNumberTextBox.Text = value; }
+ }
+
+ public string InvoiceDate {
+ set { uxInvoiceDateTextBox.Text = value; }
+ }
+
+ public string InvoiceTotal {
+ set { uxInvoiceTotalTextBox.Text = value; }
+ }
+
+ public string PaymentTotal {
+ set { uxPaymentTotalTextBox.Text = value; }
+ }
+
+ public string CreditTotal {
+ set { uxCreditTotalTextBox.Text = value; }
+ }
+
+ public string DueDate {
+ set { uxDueDateTextBox.Text = value; }
+ }
+
+ public string PaymentDate {
+ set { uxPaymentDateTextBox.Text = value; }
+ }
+
+ public string Terms {
+ set { uxTermsTextBox.Text = value; }
+ }
+
+ private void DeleteAndCloseWindow( ) {
+ _presenter.DeleteInvoice( );
+ Close( );
+ }
+ }
+} \ No newline at end of file