Exemple #1
0
 public static SamplePlanRejectModel ToModel(this SamplePlanReject aRejectEntity)
 {
     return(new SamplePlanRejectModel()
     {
         SamplePlanId = aRejectEntity.SamplePlanId,
         SamplePlanLevelId = aRejectEntity.SamplePlanLevelId,
         InspectTestTypeId = aRejectEntity.InspectTestId,
         SampleQty = aRejectEntity.SampleQty,
         RejectAllowQty = aRejectEntity.RejectAllowQty
     });
 }
Exemple #2
0
        public static SamplePlanRejectModel ToHydratedModel(this SamplePlanReject aRejectEntity)
        {
            return(new SamplePlanRejectModel()
            {
                SamplePlanId = aRejectEntity.SamplePlanId,
                SamplePlanLevelId = aRejectEntity.SamplePlanLevelId,
                InspectTestTypeId = aRejectEntity.InspectTestId,
                SampleQty = aRejectEntity.SampleQty,
                RejectAllowQty = aRejectEntity.RejectAllowQty,

                InspectionTestType = (aRejectEntity.InspectTest != null) ? aRejectEntity.InspectTest.ToModel() : null
            });
        }