Пример #1
0
        private void FillReinvestmentCostEntity(BaseAbstractEntity entity)
        {
            var reinvestmentCost = entity as ReinvestmentCost;

            if (reinvestmentCost != null)
            {
                var existReinvestmentCost =
                    ReinvestmentCost.FirstOrDefault(e => e.ConsInfoID.ToString().Equals(_refId.ToString()));
                if (existReinvestmentCost != null)
                {
                    reinvestmentCost.Id       = existReinvestmentCost.Id;
                    reinvestmentCost.NormType = existReinvestmentCost.NormType;
                }
                else
                {
                    reinvestmentCost.Id = Guid.NewGuid();
                }

                if (_refId == null)
                {
                    throw new Exception("ConsInfo Id is null, please check it!");
                }

                reinvestmentCost.ConsInfoID = _refId.Value;
            }
        }
Пример #2
0
        private void FillClosureWOCheckList(BaseAbstractEntity entity)
        {
            var woCheckList = entity as ClosureWOCheckList;

            if (woCheckList != null)
            {
                woCheckList.Id = Guid.NewGuid();
                if (_refId == null)
                {
                    throw new Exception("Id is null, please check it!");
                }
                woCheckList.Id = _refId.Value;
            }
        }
Пример #3
0
        private void FillWriteOffAmount(BaseAbstractEntity entity)
        {
            var writeOff = entity as WriteOffAmount;

            if (writeOff != null)
            {
                writeOff.Id = Guid.NewGuid();
                if (_refId == null)
                {
                    throw new Exception("ConsInfo Id is null, please check it!");
                }

                writeOff.ConsInfoID = _refId.Value;
            }
        }