示例#1
0
		private ValidationFail GetValidationFailEntity(T_ValidationFail tFail)
		{
			ValidationFail fail = new ValidationFail();
			fail.ID = tFail.FailID;
			fail.PLC = tFail.vfPLC;
			fail.SDN = tFail.vfSDN;
			return fail;
		}
示例#2
0
		public ValidationFail GetValidationsResultsByValidationID(int validationID)
		{
			using (var dc = new EngageCCTDataClassesDataContext())
			{
				T_ValidationFail tFail;
				T_ValidationResult tResults;
				T_Validation tValidation = new T_Validation();

				ValidationFail result = new ValidationFail();
				tResults = dc.T_ValidationResults
					.Where(r => r.ValidationID == validationID && r.T_ValidationType.vtDescription == ValidationConstants.OFAC)
					.FirstOrDefault();
				if (tResults == null)
					return null;
				tFail = dc.T_ValidationFails.Where(f => f.FailID == tResults.FailID).FirstOrDefault();
				if (tFail == null)
					return null;
				var table = GetValidationFailEntity(tFail);
				return table;

				//tResults = dc.T_ValidationResults.Where(r => r.ValidationID == validationID && r.FailID == r.T_ValidationFail.FailID).First();
				//tFail = dc.T_ValidationFails.Where(f => f.FailID == tResults.FailID).First();
				//var table = GetValidationFailEntity(tFail);

			}

		}