public void OnDepartmentSelected(object sender, DepartmentSelectEventArgs args) { string departmentName = args.DepartmentName; IEnumerable <EmployeeModel> employeeModelList = this.Repository.GetEmployee(departmentName); this.View.BindEmployee(employeeModelList); }
protected void btnSearch_Click(object sender, EventArgs e) { string departmentName = ddlDepartment.SelectedValue; DepartmentSelectEventArgs args = new DepartmentSelectEventArgs(departmentName); if (DepartmentSelected != null) { this.DepartmentSelected(this, args); } }