protected void ButtonSearch_Click(object sender, EventArgs e) { string department = this.DropDownListDepartments.SelectedValue; DepartmentSelectedEventArgs args = new DepartmentSelectedEventArgs(department); DepartmentSelected?.Invoke(this, args); }
private void OnDepartmentSelected(object sender, DepartmentSelectedEventArgs e) { string department = e.Department; var employees = this.Repository.GetEmployees(department); this.View.BindEmployees(employees); }