目录
1、 InsuranceclaimsController
1.1、 SelectInsurances
1.1.1、 //单据状态名称
1.1.2、 //报案编号
1.1.3、 //保单金额
using QXQPS.Models;
using QXQPS.Vo;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace QXQPS.Areas.MechanicsManagment.Controllers
{
public class InsuranceclaimsController : Controller
{
// GET: MechanicsManagment/Insuranceclaims
Models.QXQPEntities myModels = new Models.QXQPEntities();
public ActionResult SelectInsurances(int ReceptionID)
{
try
{
var lingItem = (from tbInsuranceDetail in myModels.SYS_InsuranceDetail
join tbReception in myModels.PW_Reception on tbInsuranceDetail.ReceptionID equals tbReception.ReceptionID
join tbInsuranceCom in myModels.SYS_InsuranceCom on tbInsuranceDetail.InsuranceComID equals tbInsuranceCom.InsuranceComID
join tbRepair in myModels.SYS_Repair on tbReception.RepairID equals tbRepair.RepairID
join tbDocumentState in myModels.SYS_DocumentState on tbReception.DocumentStateID equals tbDocumentState.DocumentStateID
join tbBalanceState in myModels.SYS_BalanceState on tbReception.BalanceStateID equals tbBalanceState.BalanceStateID
join tbCustomerSou in myModels.SYS_CustomerSou on tbReception.CustomerSouID equals tbCustomerSou.CustomerSouID
where tbReception.ReceptionID==ReceptionID
select new ReceptionVo
{
CustomerNum = tbReception.CustomerNum.Trim(),//客户编号
ReceptionID = tbReception.ReceptionID,//客户接待ID
DocumentStateID = tbDocumentState.DocumentStateID,//单据状态ID
DocumentState = tbDocumentState.DocumentState.Trim(),
BalanceStateID = tbBalanceState.BalanceStateID,//结算状态ID
BalanceState = tbBalanceState.BalanceState.Trim(),//结算状态名称
CarNum = tbReception.CarNum.Trim(),//车牌
VehicleType = tbReception.VehicleType.Trim(),//车型
MaintenanceNum = tbReception.MaintenanceNum.Trim(),//维修单号
Owner = tbReception.Owner.Trim(),//车主
InsuranceDetailID = tbInsuranceDetail.InsuranceDetailID,//索赔明细ID
InsuranceComID = tbInsuranceCom.InsuranceComID,//索赔厂家ID
ReportNum = tbInsuranceDetail.ReportNum,
PolicyNum = tbInsuranceDetail.PolicyNum,//保单号
PolicyMoney = (decimal)tbInsuranceDetail.PolicyMoney,
}).SingleOrDefault();
return Json(lingItem, JsonRequestBehavior.AllowGet);
}
catch (Exception)
{
return Json(false, JsonRequestBehavior.AllowGet);
}
}