Пример #1
0
        private string m_strConstructXmlRules()
        {
            Hashtable hasChoice = new Hashtable();

            clsLisQCRuleVO[]          rules   = m_arrGetRulesFromBase();
            List <QualityControlRule> qcRules = new List <QualityControlRule>();

            for (int i = 0; i < m_dtgQCRules.Rows.Count; i++)
            {
                if ((bool)m_dtgQCRules.Rows[i].Cells[1].Value)
                {
                    hasChoice.Add(m_dtgQCRules.Rows[i].Cells[0].Value, (bool)m_dtgQCRules.Rows[i].Cells[2].Value);
                }
            }

            foreach (clsLisQCRuleVO vo in rules)
            {
                if (hasChoice.Contains(vo.m_strName))
                {
                    QualityControlRule rule   = null;
                    QcParserXmlRules   parser = new QcParserXmlRules(vo.m_strFormula);
                    if (parser.Rule != null)
                    {
                        rule           = parser.Rule;
                        rule.IsWarning = (bool)hasChoice[vo.m_strName];
                        rule.Name      = vo.m_strName;
                        qcRules.Add(rule);
                    }
                }
            }

            return(QcParserXmlRules.ParserRuleArrToXmlString(qcRules));
        }
Пример #2
0
        private List <QualityControlRule> m_arrGetRuelsFromVO()
        {
            clsLisQCBatchVO  objBatch = this.objQCBatch;
            QcParserXmlRules parser   = new QcParserXmlRules(objBatch.m_strQCRules);

            return(parser.RuleList);
        }