using System; using System.Collections.Generic; using _0_Framework.Application; using Company.Domain.EmployeeChildrenAgg; using Company.Domain.EmployeeInsurancListDataAgg; using CompanyManagment.App.Contracts.EmployeeInsurancListData; namespace CompanyManagment.Application; public class EmployeeInsurancListDataApplication : IEmployeeInsurancListDataApplication { private readonly IEmployeeInsurancListDataRepository _employeeInsurancListDataRepository; public EmployeeInsurancListDataApplication(IEmployeeInsurancListDataRepository employeeInsurancListDataRepository) { _employeeInsurancListDataRepository = employeeInsurancListDataRepository; } public OperationResult Create(CreateEmployeeInsurancListData command) { var operation = new OperationResult(); if (command == null) return operation.Failed("لطفا اطلاعات ورودی را تکمیل نمایید!"); var employeeInsurancListData = new EmployeeInsurancListData(command.InsuranceListId, command.EmployeeId, command.WorkingDays, command.DailyWage, command.MonthlySalary, command.MonthlyBenefits, command.MonthlyBenefitsIncluded, command.BenefitsIncludedContinuous, command.BenefitsIncludedNonContinuous, command.InsuranceShare, command.StartWorkDate,command.LeftWorkDate,command.JobId,command.IncludeStatus, command.BaseYears,command.MarriedAllowance,command.OverTimePay,command.FamilyAllowance); _employeeInsurancListDataRepository.Create(employeeInsurancListData); _employeeInsurancListDataRepository.SaveChanges(); return operation.Succcedded(); } public OperationResult Edit(EditEmployeeInsurancListData command) { var operation = new OperationResult(); if (command == null) return operation.Failed("لطفا اطلاعات ورودی را تکمیل نمایید!"); _employeeInsurancListDataRepository.Edit(command); _employeeInsurancListDataRepository.SaveChanges(); return operation.Succcedded(); } public DetailsEmployeeInsurancListData GetDetails(long id) { throw new NotImplementedException(); } public List Search(EmployeeInsurancListDataSearchModel searchModel) { throw new NotImplementedException(); } }