 | View code sample |
| using System;
| | 1:using System.Collections.Generic;
| | 2:using System.ComponentModel;
| | 3:using System.Data;
| | 4:using System.Drawing;
| | 5:using System.Text;
| | 6:using System.Windows.Forms;
| | 7:using MVP.Presenter;
| | 8:using BusinessEntities;
| | 9:namespace MVP.View
| | 10:{
| | 11: public partial class ETGView : Form, IPresenter
| | 12: {
| | 13: MVP.Presenter.Presenter _presenter = new MVP.Presenter.Presenter();
| | 14:
| | 15: public ETGView()
| | 16: {
| | 17: InitializeComponent();
| | 18: }
| | 19:
| | 20: private void btnGetEmpInfo_Click(object sender, EventArgs e)
| | 21: {
| | 22: _presenter.GetEmployeeInfo(1);
| | 23:
| | 24: }
| | 25:
| | 26:
| | 27:
| | 28: public Employee EmployeeInfo
| | 29: {
| | 30: get
| | 31: {
| | 32: throw new Exception("The method or operation is not implemented.");
| | 33: }
| | 34: set
| | 35: {
| | 36: if (value != null)
| | 37: {
| | 38: MessageBox.Show(value.Name);
| | 39: MessageBox.Show(value.Email);
| | 40: }
| | 41: }
| | 42: }
| | 43:
| | 44:
| | 45: }
| | 46:}
| | 47: |
|