/// <summary> /// Gets the job titles ListView. /// </summary> /// <param name="seletedJobTitle">The seleted job title.</param> /// <param name="selectedJobTitle">The selected job title.</param> /// <param name="jobTitleCollections">The job title collections.</param> /// <param name="companyDetail">The company detail.</param> /// <param name="message">The message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// jobTitleCollections /// or /// companyDetail /// </exception> public IJobTitleListView GetJobTitlesListView(int selectedCompanyId, string selectedJobTitle, IList <IJobTitle> jobTitleCollections, ICompanyDetail companyDetail, IList <ICompanyDetail> companyList, string message) { if (jobTitleCollections == null) { throw new ArgumentNullException(nameof(jobTitleCollections)); } if (companyDetail == null) { throw new ArgumentNullException(nameof(companyDetail)); } var companyDDL = GetDropDownList.CompanyListItems(companyList, selectedCompanyId); var filteredList = jobTitleCollections.Where(x => x.JobTitleName.Contains(string.IsNullOrEmpty(selectedJobTitle) ? x.JobTitleName : selectedJobTitle)).ToList(); var returnedView = new JobTitleListView { JobTitlesCollection = filteredList.ToList(), CompanyDetails = companyDetail, ProcessingMessage = message, SelectedJobTitle = selectedJobTitle, CompanyDropDownList = companyDDL }; return(returnedView); }
/// <summary> /// Creates the exit management view. /// </summary> /// <param name="employeeId">The employee identifier.</param> /// <param name="companyId">The company identifier.</param> /// <param name="typeOfExitCollection">The type of exit collection.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// employeeId /// or /// companyId /// or /// typeOfExitCollection /// </exception> public IEmployeeExitView CreateExitManagementView(IEmployee employee, ICompanyDetail company, IList <ITypeOfExit> typeOfExitCollection) { if (employee == null) { throw new ArgumentNullException(nameof(employee)); } if (company == null) { throw new ArgumentNullException(nameof(company)); } if (typeOfExitCollection == null) { throw new ArgumentNullException(nameof(typeOfExitCollection)); } var typeOfExitDDL = GetDropDownList.TypeOfExitListItems(typeOfExitCollection, -1); var result = new EmployeeExitView { TypeOfExitDropDown = typeOfExitDDL, ProcessingMessage = string.Empty, Employee = employee, Company = company, }; return(result); }
/// <summary> /// Creates the pay slip view. /// </summary> /// <param name="payroll">The payroll.</param> /// <param name="employee">The employee.</param> /// <returns></returns> /// <exception cref="ArgumentNullException">payroll</exception> public IPaySlipViewModel CreatePaySlipView(IPayroll payroll, IPayScale payScale, decimal taxRate, IList <IPayScaleBenefit> payScaleBenefits, ICompanyDetail companyDetail, IDigitalFile companyLogo, IEmployee employee, ILevel level, IGrade grade, IList <IPayrollEmployeeReward> rewardCollection, IList <IPayrollEmployeeDeduction> employeeDeductionCollection, IList <IPayrollEmployeeLoan> loanCollection, decimal pensionContribution, decimal spouseConsolidation, decimal childrenConsolidation, decimal consolidationTaxRelief, decimal taxableIncome) { if (payroll == null) { throw new ArgumentNullException(nameof(payroll)); } var viewModel = new PaySlipViewModel { CompanyDetail = companyDetail, Payroll = payroll, Employee = employee, Loan = loanCollection, Reward = rewardCollection, EmployeeDeduction = employeeDeductionCollection, Level = level, Grade = grade, PayScale = payScale, PayScaleCollection = payScaleBenefits, CompanyLogo = companyLogo, TaxRate = taxRate, PensionContribution = pensionContribution, Dependant = spouseConsolidation, Children = childrenConsolidation, TaxCollation = consolidationTaxRelief, TaxationAmount = taxableIncome, }; return(viewModel); }
/// <summary> /// Creates the header view. /// </summary> /// <param name="user">The user.</param> /// <param name="company">The company.</param> /// <param name="companyLogo">The company logo.</param> /// <returns></returns> public IHeaderViewModel CreateHeaderView(IUserDetail user, ICompanyDetail company, IDigitalFile companyLogo) { var result = new HeaderViewModel { User = user, Company = company, CompanyLogo = companyLogo }; return(result); }
/// <summary> /// Creates the department ListView. /// </summary> /// <param name="departmentsCollection">The departments collection.</param> /// <param name="companyInfo">The company information.</param> /// <returns></returns> public IDepartmentListView CreateDepartmentListView(IEnumerable <IDepartment> departmentsCollection, ICompanyDetail companyInfo) { var viewModel = new DepartmentListView { DepartmentsCollection = departmentsCollection, CompanyDetails = companyInfo, }; return(viewModel); }
/// <summary> /// Creates the company registration view. /// </summary> /// <param name="companyInfo">The company information.</param> /// <param name="companyCollection">The company collection.</param> /// <returns></returns> /// <exception cref="ArgumentNullException">companyCollection</exception> public ICompanyRegistrationView CreateCompanyRegistrationView(ICompanyDetail companyInfo, IList <ICompanyDetail> companyCollection, IList <IIndustry> industryCollection, IList <ICountry> countryCollection) { if (companyCollection == null) { throw new ArgumentNullException(nameof(companyCollection)); } if (industryCollection == null) { throw new ArgumentNullException(nameof(industryCollection)); } // get parentcompany drop down list var parentCompanytDDL = GetDropDownList.CompanyListItems(companyCollection, companyInfo.ParentCompanyId ?? -1); var industryDDL = GetDropDownList.IIndsutryListItems(industryCollection, companyInfo.IndustryId); var countryDDL = GetDropDownList.CountryListItem(countryCollection, 161); var model = new CompanyRegistrationView() { ParentCompanyDropDownList = parentCompanytDDL, CountryDropDownList = countryDDL, ProcessingMessage = string.Empty, CompanyCountry = companyInfo.CompanyCountry, CACRegistrationNumber = companyInfo.CACRegistrationNumber, CompanyAddressLine1 = companyInfo.CompanyAddressLine1, CompanyAddressLine2 = companyInfo.CompanyAddressLine2, CompanyCity = companyInfo.CompanyCity, CompanyCountryId = 161, CompanyEmail = companyInfo.CompanyEmail, CompanyId = companyInfo.CompanyId, CompanyName = companyInfo.CompanyName, CompanyPhone = companyInfo.CompanyPhone, CompanyState = companyInfo.CompanyState, CompanyWebsite = companyInfo.CompanyWebsite, CompanyZipCode = companyInfo.CompanyZipCode, DateCreated = companyInfo.DateCreated, ParentCompanyId = companyInfo.ParentCompanyId, LogoDigitalFileId = companyInfo.LogoDigitalFileId, CompanyAlias = companyInfo.CompanyAlias, IsActive = companyInfo.IsActive, IndustryDropDownList = industryDDL, IndustryId = companyInfo.IndustryId, CompanyLogo = companyInfo.CompanyLogo }; return(model); }
/// <summary> /// Creates the discipline ListView. /// </summary> /// <param name="selectedCompanyId">The selected company identifier.</param> /// <param name="disciplineCollection">The discipline collection.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="message">The message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// companyCollection /// or /// disciplineCollection /// </exception> public IDisciplineListView CreateDisciplineListView(int?selectedCompanyId, ICompanyDetail company, IList <IDiscipline> disciplineCollection, string message) { if (disciplineCollection == null) { throw new ArgumentNullException(nameof(disciplineCollection)); } var filteredList = disciplineCollection.Where(x => x.CompanyId.Equals(selectedCompanyId < 1 ? x.CompanyId : selectedCompanyId)).ToList(); var returnModel = new DisciplineListView { DisciplineCollection = filteredList, Company = company, ProcessingMessage = message }; return(returnModel); }
/// <summary> /// Creates the training report. /// </summary> /// <param name="companyInfo">The company information.</param> /// <param name="employeeCollection">The employee collection.</param> /// <param name="trainingCollection">The training collection.</param> /// <param name="trainingRatingCollection">The training rating collection.</param> /// <param name="trainingCalendarCollection">The training calendar collection.</param> /// <returns></returns> public ITrainingReportViewModel CreateTrainingReport(ICompanyDetail companyInfo, IList <IEmployee> employeeCollection, int employeeId, ITraining trainingInfo, IList <ITrainingEvaluationRating> trainingRatingCollection, IList <ITrainingCalendar> trainingCalendarCollection) { var employeeDDL = GetDropDownList.EmployeeListitems(employeeCollection, -1); var evaluationDDL = GetDropDownList.TrainingEvaluationListItems(trainingRatingCollection, -1); var trainingcalendarDDL = GetDropDownList.TrainingCalendarListItems(trainingCalendarCollection, -1); var viewModel = new TrainingReportViewModel { EmployeeDropDownlist = employeeDDL, EmployeeID = employeeId, Training = trainingInfo, TrainingCalendarDropDownlist = trainingcalendarDDL, TrainingEvaluationRatingDropDownlist = evaluationDDL, CompanyID = companyInfo.CompanyId, }; return(viewModel); }
/// <summary> /// </summary> /// <param name="selectedCompanyId"></param> /// <param name="selectedTraining"></param> /// <param name="TrainingCollection"></param> /// <param name="companyCollection"></param> /// <param name="company"></param> /// <param name="processingMessage"></param> /// <returns></returns> public ITrainingListView CreateTrainingListView(int?selectedCompanyId, string selectedTraining, IList <ITraining> TrainingCollection, ICompanyDetail company, string processingMessage) { //Filter by companyId var filteredList = TrainingCollection.Where(x => x.CompanyID.Equals(selectedCompanyId < 1 ? x.CompanyID : selectedCompanyId)).ToList(); //Filter training name filteredList = filteredList.Where(x => x.TrainingName.Contains(string.IsNullOrEmpty(selectedTraining) ? x.TrainingName : selectedTraining)) .ToList(); //Create a return view model of type TrainingListView var viewModel = new TrainingListView { TrainingCollection = filteredList, Company = company, ProcessingMessage = processingMessage }; return(viewModel); }
/// <summary> /// Creates the employee payroll list. /// </summary> /// <param name="selectedMonth">The selected month.</param> /// <param name="selectedYear">The selected year.</param> /// <param name="payrollCollection">The payroll collection.</param> /// <param name="company">The company.</param> /// <param name="employee">The employee.</param> /// <param name="monthCollection">The month collection.</param> /// <param name="yearCollection">The year collection.</param> /// <param name="message">The message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// monthCollection /// or /// yearCollection /// or /// payrollCollection /// </exception> public IPayrollListView CreateEmployeePayrollList(string selectedMonth, int?selectedYear, IList <IPayroll> payrollCollection, ICompanyDetail company, IEmployee employee, IList <IMonth> monthCollection, IList <IYear> yearCollection, string message) { if (monthCollection == null) { throw new ArgumentNullException(nameof(monthCollection)); } if (yearCollection == null) { throw new ArgumentNullException(nameof(yearCollection)); } if (payrollCollection == null) { throw new ArgumentNullException(nameof(payrollCollection)); } var monthDDL = GetDropDownList.Month(monthCollection, ""); var yearDDL = GetDropDownList.Year(yearCollection, -1); var viewwModel = new PayrollListView { MonthDropDown = monthDDL, YearDropDown = yearDDL, PayrollList = payrollCollection, ProcessingMessage = message, Company = company, Employee = employee, }; return(viewwModel); }
/// <summary> /// Creates the admin dash board view. /// </summary> /// <param name="user">The user.</param> /// <param name="company">The company.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="levelCollection">The level collection.</param> /// <param name="gradeCollection">The grade collection.</param> /// <param name="jobTitleCollection">The job title collection.</param> /// <param name="disciplineCollection">The discipline collection.</param> /// <param name="leaveRequestModel">The leave request model.</param> /// <param name="departmentCollection">The department collection.</param> /// <param name="trainingCollection">The training collection.</param> /// <param name="employeeCollection">The employee collection.</param> /// <param name="employmentHistory">The employment history.</param> /// <param name="educationHistory">The education history.</param> /// <param name="skillSet">The skill set.</param> /// <param name="digitalFile">The digital file.</param> /// <param name="pendingLeaveRequests">The pending leave requests.</param> /// <param name="pendingLoanRequest">The pending loan request.</param> /// <param name="pendingTrainingRequest">The pending training request.</param> /// <param name="processingMessage">The processing message.</param> /// <returns></returns> public IEmployeeProfileView CreateAdminDashBoardView(IUserDetail user, IEmployee employeeInfo, ICompanyDetail company, IList <ICompanyDetail> companyCollection, IList <ILevel> levelCollection, IList <IGrade> gradeCollection, IList <IJobTitle> jobTitleCollection, IList <IDiscipline> disciplineCollection, IList <ILeaveRequestModel> leaveRequestModel, IList <IDepartment> departmentCollection, IList <ITraining> trainingCollection, IList <IEmployee> employeeCollection, IList <IEmploymentHistory> employmentHistory, IList <IEducationHistory> educationHistory, IList <ISkillSetModel> skillSet, IDigitalFile digitalFile, IList <ILeaveRequestModel> pendingLeaveRequests, IList <IEmployeeLoan> pendingLoanRequest, IList <IEmployeeTrainingModel> pendingTrainingRequest, string processingMessage) { var returnModel = new EmployeeProfileView { User = user, Company = company, EducationHistory = educationHistory, EmploymentHistory = employmentHistory, SkillSet = skillSet, ProfilePictureDetail = digitalFile, QueryCollection = disciplineCollection, LeaveTypeCollection = leaveRequestModel, DepartmentCollection = departmentCollection, TrainingCollection = trainingCollection, ProcessingMessage = processingMessage, EmployeeCollection = employeeCollection, LevelCollection = levelCollection, GradeCollection = gradeCollection, JobTitle = jobTitleCollection, PendingLeaveRquest = pendingLeaveRequests, PendingLoanRequest = pendingLoanRequest, PendingTrainingRequest = pendingTrainingRequest, CompanyCollection = companyCollection, Employee = employeeInfo }; return(returnModel); }
public ITrainingNeedAnalysisView CreateTrainingNeedAnalysisView(int companyId, int?selectedTrainingNeedAnalysisID, IList <ITrainingNeedAnalysis> TrainingNeedAnalysisCollection, ICompanyDetail company, string processingMessage) { throw new NotImplementedException(); }
public ITrainingNeedAnalysisListView CreateTrainingNeedAnalysisListView(int companyId, int?selectedTrainingNeedAnalysisID, IList <ITrainingNeedAnalysis> TrainingNeedAnalysisCollection, ICompanyDetail company, string processingMessage) { var filteredList = TrainingNeedAnalysisCollection .Where(x => x.TrainingNeedAnalysisID.Equals(selectedTrainingNeedAnalysisID < 1 ? x.CompanyID : selectedTrainingNeedAnalysisID)).ToList(); var viewModel = new TrainingNeedAnalysisListView { TrainingNeedAnalysisCollection = TrainingNeedAnalysisCollection, Company = company, ProcessingMessage = processingMessage }; return(viewModel); }
/// <summary> /// Creates the employee training request view. /// </summary> /// <param name="employeeTrainingModel">The employee training model.</param> /// <param name="companyInfo">The company information.</param> /// <param name="training">The training.</param> /// <param name="employee">The employee.</param> /// <param name="employeeModel">The employee model.</param> /// <returns></returns> public IEmployeeTrainingView CreateEmployeeTrainingRequestView(IList <IEmployeeTrainingModel> employeeTrainingModel, ICompanyDetail companyInfo, IList <ITraining> training, IList <IEmployee> employee, IEmployee employeeModel) { var TrainingDDL = GetDropDownList.TrainingListItems(training, -1); var EmployeeDDL = GetDropDownList.EmployeeListitems(employee, -1); var model = new EmployeeTrainingView { TrainingDropDownList = TrainingDDL, EmployeeDropDownList = EmployeeDDL, ProcessingMessage = string.Empty, EmployeeId = employeeModel.EmployeeId, CompanyId = companyInfo.CompanyId, }; return(model); }
/// <summary> /// Creates the query ListView. /// </summary> /// <param name="selectedCompanyId">The selected company identifier.</param> /// <param name="selectedQuery">The selected query.</param> /// <param name="QueryCollection">The query collection.</param> /// <param name="company">The company.</param> /// <param name="processingMessage">The processing message.</param> /// <returns></returns> public IQueryListView CreateQueryListView(int?selectedCompanyId, string selectedQuery, IList <IQuery> QueryCollection, ICompanyDetail company, string processingMessage) { var filteredList = QueryCollection .Where(x => x.CompanyId.Equals(selectedCompanyId < 1 ? x.CompanyId : selectedCompanyId)).ToList(); filteredList = filteredList .Where(x => x.QueryName.Contains(string.IsNullOrEmpty(selectedQuery) ? x.QueryName : selectedQuery)) .ToList(); var viewModel = new QueryListView { QueryCollection = filteredList, Company = company, ProcessingMessage = processingMessage }; return(viewModel); }
/// <summary> /// </summary> /// <param name="typeOfExitCollection"></param> /// <param name="companyInfo"></param> /// <param name="processingMessage"></param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// typeOfExitCollection /// or /// companyInfo /// </exception> public ITypeOfExitListView CreateTypeOfExitListView(IList <ITypeOfExit> typeOfExitCollection, ICompanyDetail companyInfo, string processingMessage) { if (typeOfExitCollection == null) { throw new ArgumentNullException("typeOfExitCollection"); } if (companyInfo == null) { throw new ArgumentNullException("companyInfo"); } var typeOfExitListView = new TypeOfExitListView { TypeOfExitCollection = typeOfExitCollection, Company = companyInfo, ProcessingMessage = processingMessage, }; return(typeOfExitListView); }
public VisitingCardFrm(ICompanyDetail companyDetail) { InitializeComponent(); _companyDetail = companyDetail; }
/// <summary> /// </summary> /// <param name="selectedCompanyId"></param> /// <param name="queryCollection"></param> /// <param name="suspensionCollection"></param> /// <param name="employeeCollection"></param> /// <param name="companyCollection"></param> /// <param name="company"></param> /// <param name="processingMessage"></param> /// <returns></returns> public ISuspensionListView CreateSuspensionListView(int?selectedCompanyId, IList <IQuery> queryCollection, IList <ISuspension> suspensionCollection, IList <IEmployee> employeeCollection, ICompanyDetail company, string processingMessage) { //Create a Compny drop down for the filter at the list view var employeeDDL = GetDropDownList.EmployeeListitems(employeeCollection, -1); var queryDDL = GetDropDownList.QueryListItems(queryCollection, -1); //Filter by companyId var filteredList = suspensionCollection .Where(x => x.CompanyId.Equals(selectedCompanyId < 1 ? x.CompanyId : selectedCompanyId)).ToList(); //Create a return view model of type suspensionListView var viewModel = new SuspensionListView { SuspensionCollection = filteredList, Company = company, ProcessingMessage = processingMessage }; return(viewModel); }
/// <summary> /// Creates the edit employee training view. /// </summary> /// <param name="employeeTrainingModel">The employee training model.</param> /// <param name="companyInfo">The company information.</param> /// <param name="employeeCollection">The employee collection.</param> /// <param name="trainingCollection">The training collection.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// employeeTrainingModel /// or /// companyCollecction /// or /// trainingCollection /// or /// companyCollecction /// </exception> public IEmployeeTrainingView CreateEditEmployeeTrainingView(IEmployeeTrainingModel employeeTrainingModel, ICompanyDetail companyInfo, IList <IEmployee> employeeCollection, IList <ITraining> trainingCollection) { if (employeeTrainingModel == null) { throw new ArgumentNullException(nameof(employeeTrainingModel)); } if (trainingCollection == null) { throw new ArgumentNullException(nameof(trainingCollection)); } if (employeeCollection == null) { throw new ArgumentNullException(nameof(employeeCollection)); } var trainingDDL = GetDropDownList.TrainingListItems(trainingCollection, employeeTrainingModel.TrainingId); var employeeDDL = GetDropDownList.EmployeeListitems(employeeCollection, employeeTrainingModel.EmployeeId); var viewModel = new EmployeeTrainingView { EmployeeTrainingId = employeeTrainingModel.EmployeeTrainingId, TrainingId = employeeTrainingModel.TrainingId, SupervisorId = employeeTrainingModel.SupervisorId, EmployeeId = employeeTrainingModel.EmployeeId, DateApproved = employeeTrainingModel.DateApproved, CompanyId = employeeTrainingModel.CompanyId, DateCreated = employeeTrainingModel.DateCreated, EmployeeDropDownList = employeeDDL, TrainingDropDownList = trainingDDL, ProcessingMessage = string.Empty, }; return(viewModel); }
/// <summary> /// Creates the employee exit ListView. /// </summary> /// <param name="companyId">The company identifier.</param> /// <param name="selectedEmployeeExitID">The selected employee exit identifier.</param> /// <param name="employeeExitCollection">The employee exit collection.</param> /// <param name="company">The company.</param> /// <param name="processingMessage">The processing message.</param> /// <returns></returns> public IEmployeeExitListView CreateEmployeeExitListView(int companyId, int?selectedEmployeeExitID, IList <IEmployeeExit> employeeExitCollection, ICompanyDetail company, string processingMessage) { var viewModel = new EmployeeExitListView { employeeExitCollection = employeeExitCollection, SelectedCompanyID = companyId, ProcessingMessage = processingMessage }; return(viewModel); }
/// <summary> /// Creates the specific employee training view. /// </summary> /// <param name="selectedEmployeeId">The selected employee identifier.</param> /// <param name="employee">The employee.</param> /// <param name="company">The company.</param> /// <param name="trainingCollection">The training collection.</param> /// <param name="companyCollection">The company collection.</param> /// <param name="processingMessage">The processing message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// trainingCollection /// or /// companyCollection /// or /// trainingCollection /// or /// trainingCollection /// </exception> public IEmployeeTrainingListView CreateSpecificEmployeeTrainingView(int?selectedEmployeeId, IEmployee employee, ICompanyDetail company, IList <IEmployeeTrainingModel> trainingCollection, IList <ICompanyDetail> companyCollection, string processingMessage) { if (trainingCollection == null) { throw new ArgumentNullException(nameof(trainingCollection)); } if (companyCollection == null) { throw new ArgumentNullException(nameof(companyCollection)); } if (trainingCollection == null) { throw new ArgumentNullException(nameof(trainingCollection)); } if (trainingCollection == null) { throw new ArgumentNullException(nameof(trainingCollection)); } var companyDDL = GetDropDownList.CompanyListItems(companyCollection, -1); var employeeTrainingDDL = GetDropDownList.EmployeeTrainingListItems(trainingCollection, -1); var viewModel = new EmployeeTrainingListView { CompanyDropDownList = companyDDL, employeeTrainingView = trainingCollection, ProcessingMessage = processingMessage, Employee = employee, Company = company, }; return(viewModel); }
public ILeaveRequestListView CreateLeaveRequestList(IList <ILeaveRequestModel> leaveRequestCollection, IEmployee employee, ICompanyDetail company, int employeeId, string processingMessage) { var ViewModel = new LeaveRequestListView { LeaveRequestCollection = leaveRequestCollection, employeeId = employeeId, ProcessingMessage = processingMessage, Employee = employee, Company = company }; return(ViewModel); }
/// <summary> /// Gets the trainee ListView. /// </summary> /// <param name="selectedCompanyId">The selected company identifier.</param> /// <param name="selectedTrainingId">The selected training identifier.</param> /// <param name="TraineeView">The trainee view.</param> /// <param name="companyInfo">The company information.</param> /// <param name="trainingCollection">The training collection.</param> /// <param name="processingMessage">The processing message.</param> /// <param name="trainigReport">The trainig report.</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// TraineeView /// or /// trainingCollection /// </exception> public IEmployeeTrainingListView GetTraineeListView(int?selectedCompanyId, int?selectedTrainingId, IList <IEmployeeTrainingModel> TraineeView, ICompanyDetail companyInfo, IList <ITraining> trainingCollection, string processingMessage, IList <ITrainingReport> trainigReport) { if (TraineeView == null) { throw new ArgumentNullException(nameof(TraineeView)); } if (trainingCollection == null) { throw new ArgumentNullException(nameof(trainingCollection)); } var trainingDDL = GetDropDownList.TrainingListItems(trainingCollection, -1); var filteredList = TraineeView .Where(x => x.CompanyId.Equals(selectedCompanyId < 1 ? x.CompanyId : selectedCompanyId)).ToList(); filteredList = filteredList .Where(x => x.TrainingId.Equals(selectedTrainingId < 1 ? x.TrainingId : selectedTrainingId)).ToList(); var view = new EmployeeTrainingListView { employeeTrainingView = filteredList, Company = companyInfo, TrainingDropDownList = trainingDDL, ProcessingMessage = processingMessage ?? "" }; return(view); }