来源:MySql.Data.Entity.EF6 存储过程生成错误索引超出了数组的范围。
List<PayRollAllocationList> payroll = db.SP_EmployeePayRoll(orgCode, Medicalallowcode, HouseRentallowcode, HomeLoanInterest, Sect80allowcode, Childallowcode, Mediclaimallowcode, convallowcode, Miscellaneous, fromMonthValue, fromYearValue, toMonthValue, toYearValue, startDateValue, endDateValue)
.Select(x => new PayRollAllocationList
{
BankAccNo = x.BankAccountNo,
BankName = x.BankName,
BankIFSCCode = x.BankIFSCCode,
estatus = x.Status,
PayrollMonth = x.Month,
Year = x.Year,
EmployeeName = x.EmpoyeeName,
Designation = x.Designation,
JoiningDate = x.JoiningDate,
payconveyance = x.ConveyanceAndInternetReimbursement,
PayMedicalAllow = x.MedicalAllowance,
PayHouseAllow = x.HouseRentAllowance,
PayHomeLoanInterest = x.HomeLoanInterest,
PaySectionAllow = x.MonthlyInvestments,
Paychildedu = x.ChildrenEducationAllowance,
Paymediclaim = x.Mediclaim,
////miscellaneous = db.salarymasters.Where(t => t.ApplicationUserID == x.ApplicationUserID && t.AllowanceTypeID == Miscellaneous && t.IsActive == true && t.applicationuser.organizationmaster.OrganizationCode == orgCode).Select(t => t.Amount) != null ? db.salarymasters.Where(t => t.ApplicationUserID == x.ApplicationUserID && t.AllowanceTypeID == Miscellaneous && t.IsActive == true && t.applicationuser.organizationmaster.OrganizationCode == orgCode).Select(t => t.Amount).Sum() : 0,
Paymiscellaneous = x.Miscellaneous,
PayBasicSalary = x.Basic,
PayIncentive = x.TotalCompensation,
PayTDSDeduction = string.IsNullOrEmpty(x.TDS) ? "0" : x.TDS,
PayEmployeeESIC = x.EmployeeESIC,
PayEmployerESIC = x.EmployerESIC,
PayEmployeePF = x.EmployeePF,
PayEmployerPF = x.EmployerPF,
TotalESIC = (!string.IsNullOrEmpty(x.EmployeeESIC) ? Convert.ToDecimal(x.EmployeeESIC) + (!string.IsNullOrEmpty(x.EmployerESIC) ? Convert.ToDecimal(x.EmployerESIC) : 0) : 0),
TotalPF = (!string.IsNullOrEmpty(x.EmployeePF) ? Convert.ToDecimal(x.EmployeePF) + (!string.IsNullOrEmpty(x.EmployerPF) ? Convert.ToDecimal(x.EmployerPF) : 0) : 0),
PayProfessionalTax = string.IsNullOrEmpty(x.ProfessionalTax) ? "0" : x.ProfessionalTax,
PayNonTaxableAmount = x.TotalNonTaxable,
PayTaxableAmount = x.TotalTaxableCompensation,
PaysalaryandConv = x.SalaryConveyance,
Paytotalcompensation = x.TotalCompensation,
PayNetSalary = x.NetPayble,
PayprojectIncentive = x.ProjectIncentive,
PayOTIncentive = x.OTIncentive,
PayAdjustAmt = x.AdjustmentAmount,
AdjustDesc = x.AdjustmentDescriptiom,
PayLWPAmt = x.LWP,
}).ToList();
在 MySql.Data.Entity.EFMySqlDataReader.GetDataTypeName(Int32 序数) 在 System.Data.Entity.Core.Objects.Internal.BufferedDataRecord.ReadMetadata(String providerManifestToken, DbProviderServices providerServices, DbDataReader reader) 在 System.Data.Entity.Core.Objects。在 System.Data.Entity.Core.Objects.Internal.BufferedDataReader.Initialize(字符串 providerManifestToken、DbProviderServices providerServices、Type[ ] columnTypes, Boolean[] nullableColumns) 在 System.Data.Entity.Core.Objects.ObjectContext.CreateFunctionObjectResult[TElement](EntityCommand entityCommand, ReadOnlyCollection1 entitySets, EdmType[] edmTypes, ExecutionOptions executionOptions)
at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass45
1.b__44() 在 System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func 1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass45
1.b__43() 在 System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func 1 operation)
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, ExecutionOptions executionOptions, ObjectParameter[] parameters)
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, MergeOption mergeOption, ObjectParameter[] parameters)
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteFunction[TElement](String functionName, ObjectParameter[] parameters)
at OMS.omsdbEntities.SP_EmployeePayRoll(String orgCode, Nullable
1 medicalallowcode, Nullable 1 houseRentallowcode, Nullable
1 homeLoanInterest, Nullable 1 sect80allowcode, Nullable
1 childallowcode, Nullable 1 mediclaimallowcode, Nullable
1 convallowcode, Nullable 1 miscellaneous, Nullable
1 fromMonthValue, Nullable 1 fromYearValue, Nullable
1 toMonthValue, Nullable 1 toYearValue, Nullable
1 startDateValue, Nullable`1 endDateValue) in F:\Pooja\OMS\OMS\OMS\OMS_data.Context.cs:line 185 at OMS .Service.ReportService.GetPayRollAllocationList() 在 F:\Pooja\OMS\OMS\OMS\Service\ReportService.cs:132 行