From 330be9feefb6394479553be0e078b4c4df3cbff1 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sun, 26 Aug 2007 20:10:42 -0600 Subject: import from svn --- .../DeleteInvoiceView.cs | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs (limited to 'src/app/Cmpp298.Assignment3.Desktop.UI/DeleteInvoiceView.cs') 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 -- cgit v1.2.3