This commit is contained in:
parent
46f56a27cb
commit
6a906beb70
|
@ -407,11 +407,15 @@ namespace BLL
|
|||
List<Model.ProcessControl_InspectionManagement> InspectionMangementList = (from x in Funs.DB.ProcessControl_InspectionManagement where x.ProjectId == projectId select x).ToList();
|
||||
if (isOnceQualified == true)
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == null || x.IsOnceQualified == true select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToList();
|
||||
}
|
||||
if (startDate != null && SoptDate != null)
|
||||
if (startDate != null)
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.InspectionDate >= startDate && x.InspectionDate <= SoptDate select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
|
||||
}
|
||||
if (SoptDate != null)
|
||||
{
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate <= SoptDate || x.InspectionDate == null).ToList();
|
||||
}
|
||||
return InspectionMangementList;
|
||||
}
|
||||
|
@ -422,19 +426,23 @@ namespace BLL
|
|||
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.ProjectId == projectId select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.ProjectId == projectId).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cNProfessionalId) && cNProfessionalId != "0")
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.CNProfessionalId == cNProfessionalId select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.CNProfessionalId == cNProfessionalId).ToList();
|
||||
}
|
||||
if (isOnceQualified == true)
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == null || x.IsOnceQualified == true select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToList();
|
||||
}
|
||||
if (startDate != null && SoptDate != null)
|
||||
if (startDate != null)
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.InspectionDate >= startDate && x.InspectionDate <= SoptDate select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
|
||||
}
|
||||
if (SoptDate != null)
|
||||
{
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate <= SoptDate || x.InspectionDate == null).ToList();
|
||||
}
|
||||
|
||||
return InspectionMangementList;
|
||||
|
@ -445,15 +453,19 @@ namespace BLL
|
|||
List<Model.ProcessControl_InspectionManagement> InspectionMangementList = (from x in Funs.DB.ProcessControl_InspectionManagement where x.ProjectId == projectId select x).ToList();
|
||||
if (!string.IsNullOrEmpty(unitId) && unitId != "0")
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.UnitId == unitId select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.UnitId == unitId).ToList();
|
||||
}
|
||||
if (isOnceQualified == true)
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == null || x.IsOnceQualified == true select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToList();
|
||||
}
|
||||
if (startDate != null && SoptDate != null)
|
||||
if (startDate != null)
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.InspectionDate >= startDate && x.InspectionDate <= SoptDate select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
|
||||
}
|
||||
if (SoptDate != null)
|
||||
{
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate <= SoptDate || x.InspectionDate == null).ToList();
|
||||
}
|
||||
|
||||
return InspectionMangementList;
|
||||
|
@ -466,19 +478,23 @@ namespace BLL
|
|||
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.ProjectId == projectId select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.ProjectId == projectId).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(cNProfessionalId) && cNProfessionalId != "0")
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.CNProfessionalId == cNProfessionalId select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.CNProfessionalId == cNProfessionalId).ToList();
|
||||
}
|
||||
if (isOnceQualified == true)
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.IsOnceQualified == null || x.IsOnceQualified == true select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.IsOnceQualified == null || x.IsOnceQualified == true).ToList();
|
||||
}
|
||||
if (startDate != null && SoptDate != null)
|
||||
if (startDate != null)
|
||||
{
|
||||
InspectionMangementList = (from x in InspectionMangementList where x.InspectionDate >= startDate && x.InspectionDate <= SoptDate select x).ToList();
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate >= startDate).ToList();
|
||||
}
|
||||
if (SoptDate != null)
|
||||
{
|
||||
InspectionMangementList = InspectionMangementList.Where(x => x.InspectionDate <= SoptDate || x.InspectionDate == null).ToList();
|
||||
}
|
||||
|
||||
return InspectionMangementList;
|
||||
|
|
Loading…
Reference in New Issue