private void FixupProductKeyInfo(ProductKeyInfo previousValue) { if (previousValue != null && previousValue.ReturnReportKeys.Contains(this)) { previousValue.ReturnReportKeys.Remove(this); } if (ProductKeyInfo != null) { if (!ProductKeyInfo.ReturnReportKeys.Contains(this)) { ProductKeyInfo.ReturnReportKeys.Add(this); } if (ProductKeyID != ProductKeyInfo.ProductKeyID) { ProductKeyID = ProductKeyInfo.ProductKeyID; } } }
private string ValidateReturn(ProductKeyInfo key, ReturnReport returnReport, ReturnReportKey returnReportKey) { if (!returnReport.ReturnNoCredit) { return "OJ"; } else { if (key == null) return "PB"; else if (key.ProductKeyStateID == 5) return "PF"; else return "QK"; } }