Ejemplo n.º 1
0
        /// <summary>
        /// 更新修改
        /// </summary>
        /// <param name="model"></param>
        public void updateInspecationMain(Entities.InspecationMain model)
        {
            var item = _sysInspecationMainRepository.getById(model.Id);

            if (item == null)
            {
                return;
            }
            _sysInspecationMainRepository.update(model);
        }
Ejemplo n.º 2
0
        public void spInspecationMain(Entities.InspecationMain model)
        {
            var item = _sysInspecationMainRepository.getById(model.Id);

            if (item == null)
            {
                return;
            }
            List <Entities.Inspection> list = null;

            list = _sysInspecationRepository.Table.Where(o => o.MainId == item.Id).ToList();
            foreach (Entities.Inspection u in list)
            {
                var ins = _sysInspecationRepository.getById(u.Id);
                ins.flag = model.flag;
                _sysInspecationRepository.update(ins);
            }
            _sysInspecationMainRepository.update(model);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 新增,插入
 /// </summary>
 /// <param name="model"></param>
 public void insertInspecationMain(Entities.InspecationMain model)
 {
     //if (existAccount(model.Name))
     //   return;
     _sysInspecationMainRepository.insert(model);
 }