blob: c7079565e9024ea0d936f10547863ba70afd93dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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( );
}
}
}
|