Esempio n. 1
0
 public AddEditForm(AddEditPresenter presenter)
 {
     this.presenter = presenter;
     InitializeComponent();
     this.departmentCombobox.Items.AddRange(presenter.GetDepartmentNames().ToArray());
     this.departmentCombobox.DropDownStyle = ComboBoxStyle.DropDownList;
 }
Esempio n. 2
0
		/// <summary>
		/// Opens another form to add a new employee
		/// </summary>
		public void OpenAddDialog()
		{
			AddEditPresenter addPresenter = new AddEditPresenter(this,model, ViewMode.Add);
		}
Esempio n. 3
0
		/// <summary>
		/// Opens another form to edit an employee
		/// </summary>
		/// <param name="selectedNode">The employee selected in a treeview.</param>
		public void OpenEditDialog(TreeNode selectedNode)
		{
			Empoyee employee = employees.First(e => e.ID == (decimal)selectedNode.Tag);
			AddEditPresenter editPresenter = new AddEditPresenter(this,model,ViewMode.Edit,employee);
		}