提问人:Syed Basit 提问时间:9/18/2023 更新时间:9/18/2023 访问量:33
下载表单时数据未更新
Data not updating when i download a form
问:
PDF 数据不会根据插入的数据动态变化
**我有一个应用程序,其中的模型、控制器、接口和管理器类都是 C# 的,也许从您可以理解的代码和图像中我需要更新总公积金第 80C 节的数据** `
public class EmplyeeSalaryDetails
{
public EmplyeeSalaryDetails()
{
SectionInvestmentList = new List<KeyValue>();
}
public string EmployeeId { get; set; }
public string EmployeeName { get; set; }
public decimal Amount { get; set; }
public decimal PaidAmount { get; set; }
public decimal EPFAmount { get; set; }
public decimal EmployeeInvestmentsAmount { get; set; }
public decimal TotalConveyanceAndHouseRent { get; set; }
public decimal DeductedConvAndHouseAMtInPaidAmt { get; set; }
public ActionResult DownloadEmployeeForm16(string Id, string cookieValue = "")
{
EmplyeeSalaryDetails empSalaryDetail = new EmplyeeSalaryDetails();
try
{
Guid empId = new Guid(Id);
empSalaryDetail = _paySalaryManager.GetEmployeeSalary(empId);
if (empSalaryDetail.PaidAmount > 0)
{
return FileAsPDF(empSalaryDetail, "Partials/_EmployeeForm16", "Form16_" + DateTime.Now.ToShortDateString(), cookieValue);
}
}
catch (Exception ex)
{
Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
TempData["Success"] = "Something went wrong";
}
return RedirectToAction("EmployeeInvestmentDetailList");
//return FileAsPDF(empSalaryDetail, "Partials/_EmployeeForm16", "Form16_" + DateTime.Now.ToShortDateString(), cookieValue);
}
var empInvestmentData = context.EmployeeInvestmentDetails.Where(x => !x.IsDeleted && x.EmployeeId == Id);
empSalaryDetail.PaidAmount = entity.Sum(x => x.PaidValue);
empSalaryDetail.EPFAmount = entity.Sum(x => x.PaidValue );
我尝试了empSalaryDetail.EPFAmount = entity。Sum(x => x.PaidValue - x.EPF.toDecimal() ); 但是在此之后,它的投掷错误出了点问题 我期待总支付金额 - 我插入的 UI 中的总金额
答: 暂无答案
评论