示例#1
0
        public void InsertList(List <tb_m_detail_spec> _lists)
        {
            foreach (tb_m_detail_spec tmp in _lists)
            {
                switch (tmp.RowState)
                {
                case CommandNameEnum.Add:
                    _repository.Add(tmp);
                    break;

                case CommandNameEnum.Edit:
                    tb_m_detail_spec existing = _repository.Find(x => x.ID == tmp.ID).FirstOrDefault();
                    _repository.Edit(existing, tmp);
                    break;
                }
            }
        }
示例#2
0
        public void Update()
        {
            tb_m_detail_spec existing = _repository.Find(x => x.ID == this.ID).FirstOrDefault();

            _repository.Edit(existing, this);
        }