示例#1
0
        public static void MatchRudeRule(List <ScrapTableItem> scraptable)
        {
            var pnmesmap = PnMESVM.RetriveMESKey2TestDict();

            foreach (var item in scraptable)
            {
                if (!string.IsNullOrEmpty(item.TestData.DataID))
                {
                    if (pnmesmap.ContainsKey(item.TestData.MESTab + item.PNKey))
                    {
                        item.WhichTest = pnmesmap[item.TestData.MESTab + item.PNKey];
                        item.RlueList  = PnRulesVM.RetrieveRule(item.PNKey, item.WhichTest, item.TestData.ErrAbbr);
                    }
                }
            }//end foreach
        }
示例#2
0
        public static List <PnMainVM> RetrieveAllPnSetting(string pn)
        {
            var ret = new List <PnMainVM>();

            var sql = "select PNKey,PN,PNPJ,DefaultResult from PnMainVM where PN = '<PN>' order by PNPJ";

            sql = sql.Replace("<PN>", pn);

            var dbret = DBUtility.ExeLocalSqlWithRes(sql);

            foreach (var line in dbret)
            {
                var tempvm = new PnMainVM();
                tempvm.PNKey         = Convert.ToString(line[0]);
                tempvm.PN            = Convert.ToString(line[1]);
                tempvm.PNPJ          = Convert.ToString(line[2]);
                tempvm.DefaultResult = Convert.ToString(line[3]);
                tempvm.PnRuleList    = PnRulesVM.RetrieveRule(tempvm.PNKey);
                ret.Add(tempvm);
            }
            return(ret);
        }