Example #1
0
        public void AfterEstablish()
        {
            string rgiExecuted = null;

            try
            {
                if (!(ActiveFeature.FNO == 16 || ActiveFeature.FNO == 91))
                {
                    Common oCommon = new Common(this);
                    oCommon.SetValues();

                    rgiExecuted = "Common RGI:Voltage Agreement";
                    rgiVoltageAgreement oVoltageAgreement = new rgiVoltageAgreement(this, oCommon);
                    oVoltageAgreement.ProcessValidationEstablish();

                    rgiExecuted = "Common RGI:Feeder Agreement";
                    rgiFeederAgreement oFeederAgreement = new rgiFeederAgreement(this, oCommon);
                    oFeederAgreement.ProcessValidationEstablish();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error in " + rgiExecuted + "- AfterEstablish  \n" + ex.Message, "G/Technology", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
        public virtual void Validate(out string[] ErrorPriorityArray, out string[] ErrorMessageArray)
        {
            ErrorPriorityArray = null;
            ErrorMessageArray  = null;
            string rgiExecuted = null;

            try
            {
                List <string> m_lstErrorMessage  = new List <string>();
                List <string> m_lstErrorPriority = new List <string>();

                Common oCommon = new Common(this);
                oCommon.SetValues();

                rgiExecuted = "Common RGI:Voltage Agreement";
                rgiVoltageAgreement oVoltageAgreement = new rgiVoltageAgreement(this, oCommon);
                oVoltageAgreement.Validate(out ErrorPriorityArray, out ErrorMessageArray);

                if (ErrorPriorityArray != null && ErrorMessageArray != null)
                {
                    m_lstErrorPriority.AddRange(ErrorPriorityArray);
                    m_lstErrorMessage.AddRange(ErrorMessageArray);
                }

                rgiExecuted = "Common RGI:Feeder Agreement";

                rgiFeederAgreement oFeederAgreement = new rgiFeederAgreement(this, oCommon);
                oFeederAgreement.Validate(out ErrorPriorityArray, out ErrorMessageArray);

                if (ErrorPriorityArray != null && ErrorMessageArray != null)
                {
                    m_lstErrorPriority.AddRange(ErrorPriorityArray);
                    m_lstErrorMessage.AddRange(ErrorMessageArray);
                }

                ErrorPriorityArray = m_lstErrorPriority.ToArray();
                ErrorMessageArray  = m_lstErrorMessage.ToArray();
            }
            catch (Exception ex)
            {
                throw new Exception("Error in " + rgiExecuted + "-Validate: " + ex.Message);
            }
        }