예제 #1
0
        public void SaveOrder(Order newOrder)
        {
            var tempOrderAgreement = newOrder.OrderAgreement;

            newOrder.OrderAgreement = null;
            _orderRepository.Add(newOrder);

            if (tempOrderAgreement != null)

            {
                _orderAgreementRepository.Add(tempOrderAgreement);
            }
        }
예제 #2
0
        public void SaveAgreement(Agreement newAgreement)
        {
            SetTempOrderAgreemenr(newAgreement);

            _agreementRepository.Add(newAgreement);



            if (tempOrderAgreement != null)
            {
                tempOrderAgreement.AgreementId = newAgreement.Id;
                if (_orderAgreementRepository.GetAllByExpression().Where(ordAgr => ordAgr.OrderId == tempOrderAgreement.OrderId).ToList() == null)
                {
                    _orderAgreementRepository.Add(tempOrderAgreement);
                }
            }
        }