public ActionResult SeletUpOwner(int OwnerID)
{
var list = (from tbOwner in myModel.S_OwnerInformation//车主(维修客户)
join tbCarType in myModel.S_CarType on tbOwner.CarTypeID equals tbCarType.CarTypeID//车辆类型
join tbDepartment in myModel.S_Department on tbOwner.DepartmentID equals tbDepartment.DepartmentID//部门
join tbEmployee in myModel.S_Employee on tbOwner.EmployeeID equals tbEmployee.EmployeeID//员工表
join tbCarder in myModel.R_Carder on tbEmployee.EmployeeID equals tbCarder.EmployeeID//接车人(所属员工)
join tbCustomerArea in myModel.D_CustomerArea on tbOwner.CustomerAreaID equals tbCustomerArea.CustomerAreaID//客户区域
join tbCustomerClass in myModel.D_CustomerClass on tbOwner.CustomerClassID equals tbCustomerClass.CustomerClassID//客户等级
join tbCustomerSource in myModel.D_CustomerSource on tbOwner.CustomerSourceID equals tbCustomerSource.CustomerSourceID//客户来源
join tbCustomerType in myModel.D_CustomerType on tbOwner.CustomerTypeID equals tbCustomerType.CustomerTypeID//客户类别
join tbInsuranceCompany in myModel.S_InsuranceCompany on tbOwner.InsuranceCompanyID equals tbInsuranceCompany.InsuranceCompanyID//保险公司
join tbInsuranceType in myModel.S_InsuranceType on tbInsuranceCompany.InsuranceTypeID equals tbInsuranceType.InsuranceTypeID//保险种类
where tbOwner.OwnerInformationID == OwnerID
select new Carowner
{
EntryMan = tbOwner.EntryMan,//录入人
OwnerInformationID = tbOwner.OwnerInformationID,//车主ID
OwnerName = tbOwner.OwnerName,//车主姓名
OwnerNumber = tbOwner.OwnerNumber,//客户编号
BusNumber = tbOwner.BusNumber,//车牌号码
EngineNumber = tbOwner.EngineNumber,//发动机号
FrameNumber = tbOwner.FrameNumber,//车架号
Repairman = tbOwner.Repairman,//送修人
RepairmanPhone = tbOwner.RepairmanPhone,//送修人电话
OwnerTelephone = tbOwner.OwnerTelephone,//车主手机
OwnerAddress = tbOwner.OwnerAddress,//车主地址
StrSafetyDay = tbOwner.SafetyDay.ToString(),// 保险起始日
StrTerminationDay = tbOwner.TerminationDay.ToString(),//保险终止日
drive = tbOwner.Drivelicence.ToString(),// 行驶证年审
drivelicence = tbOwner.DrivelicenceDate.ToString(),//驾驶证年审
OwnerBirthday = tbOwner.OwnerBirthday,//生日
OwnerIdCard = tbOwner.OwnerIdCard,//车主身份证号码
DepartmentName = tbDepartment.DepartmentName,//所属部门
CarderName = tbEmployee.EmployeeName,//所属员工
ClassName = tbCustomerClass.CustomerClassName,// 客户等级
SourceName = tbCustomerSource.CustomerSourceName,//客户来源
AreaName = tbCustomerArea.CustomerAreaName,// 所在区域
ClinetType = tbCustomerType.CustomerTypeName,//客户类别
InsurType = tbInsuranceType.InsuranceType,// 保险种类
CarType = tbCarType.CarTypeName,//车型
CarTypeID = tbCarType.CarTypeID,//车辆类型ID
}).Single();
return Json(list, JsonRequestBehavior.AllowGet);
}
修改维修客户
最新推荐文章于 2024-07-16 14:54:00 发布