Exemplo n.º 1
0
        public void DeleteMeasProg(int id)
        {
            MeasProg mp = null;

            try
            {
                mp = MeasProgs.Where(p => p.Id == id).Single();
                MeasProgs.Remove(mp);
            }
            catch (Exception)
            {
            }
        }
Exemplo n.º 2
0
        public string GetMeasProg(int id)
        {
            MeasProg prg        = null;
            string   resultProg = string.Empty;

            try
            {
                prg        = MeasProgs.Where(p => p.Id == id).Single();
                resultProg = prg.FileName;
            }
            catch (Exception)
            {
                throw new FileNotFoundException("测量程序未找到");
            }
            return(resultProg);
        }