Beispiel #1
0
        /// <summary>
        /// Checks if input Distress is in METHOD
        /// </summary>
        /// <param name="strDistress">PCI Distress</param>
        /// <param name="strSeverity">PCI Distress Severity</param>
        /// <returns></returns>
        public bool CheckDistress(String strDistress, String strSeverity, out String strError)
        {
            strError = "";
            if (strDistress == "No Distress")
            {
                return(true);
            }
            PCIDistressObject pciDistress = m_listDistresses.Find(delegate(PCIDistressObject pci) { return(pci.Distress == strDistress); });

            if (pciDistress == null)
            {
                strError = "Error: Distress:" + strDistress + " not included for PCI Method:" + this.Method;
                return(false);//Distress not found
            }
            if (pciDistress.Severities.Count == 0)
            {
                return(true);
            }

            if (!pciDistress.Severities.Contains(strSeverity.ToUpper()))
            {
                strError = "Error: Severity: " + strSeverity + " not included for PCI Distress:" + strDistress;
                return(false);
            }
            return(true);
        }
Beispiel #2
0
        public int GetDistress(String strDistress)
        {
            PCIDistressObject distress = m_listDistresses.Find(delegate(PCIDistressObject pciDistress) { return(pciDistress.Distress == strDistress); });

            return(distress.DistressNumber);
        }
Beispiel #3
0
 /// <summary>
 /// Add distress and severities to method
 /// </summary>
 /// <param name="pciDistress"></param>
 public void AddDistress(PCIDistressObject pciDistress)
 {
     m_listDistresses.Add(pciDistress);
 }