public void addMB_Test(IMES.DataModel.MB_TestDef mbTest) { IList<MBTestDef> lstMBtestDef = new List<MBTestDef>(); lstMBtestDef = itestMB.GetMBTestByCodeFamilyAndType(mbTest.Code, mbTest.Family, mbTest.Type); try { MBTestDef mbTestDef = new MBTestDef(); mbTestDef.family = mbTest.Family; mbTestDef.type = mbTest.Type; mbTestDef.code = mbTest.Code; mbTestDef.remark = mbTest.Remark; mbTestDef.editor = mbTest.editor; mbTestDef.cdt = mbTest.cdt; mbTestDef.udt = mbTest.udt; if (lstMBtestDef != null && lstMBtestDef.Count > 0) { //已经存在具有相同testMB的记录 List<string> erpara = new List<string>(); FisException ex; ex = new FisException("DMT113", erpara); throw ex; } else { itestMB.AddMBTest(mbTestDef); } } catch (Exception e) { throw e; } }
protected IList<MBTestDef> convertTombTestDef(IList<MB_TestDef> lstMB_TestDef) { IList<MBTestDef> lstMBTestDef = new List<MBTestDef>(); foreach (MB_TestDef mbtestDef in lstMB_TestDef) { MBTestDef mbTestDef = new MBTestDef(); mbTestDef.id = mbtestDef.id; mbTestDef.family = mbtestDef.Family; mbTestDef.code = mbtestDef.Code; mbTestDef.remark = mbtestDef.Remark; mbTestDef.type = mbtestDef.Type; mbTestDef.editor = mbtestDef.editor; mbTestDef.cdt = mbtestDef.cdt; mbTestDef.udt = mbtestDef.udt; lstMBTestDef.Add(mbTestDef); } return lstMBTestDef; }