public PlanReceiptOrderPersonalAccountDto GetPlanReceiptOrderPersonalAccount(long id)
        {
            PlanReceiptOrderPersonalAccountDto result =
                GetEntity <PlanReceiptOrderPersonalAccount, PlanReceiptOrderPersonalAccountDto>(id);

            return(result);
        }
        public PlanReceiptOrderPersonalAccountDto AddPlanReceiptOrderPersonalAccount(PlanReceiptOrderPersonalAccountDto entity)
        {
            var repository      = RepositoryFactory.Create <PlanCertificate>();
            var planCertificate = repository.Get(entity.PlanCertificate.Rn);

            if ((planCertificate.State != PlanCertificateState.NotСonfirm) &&
                (planCertificate.State != PlanCertificateState.Confirm))
            {
                throw new CheckingSetStatePlanReceiptOrderInvalidException(Resource.PCO_13);
            }

            return
                (AddEntity <PlanReceiptOrderPersonalAccount, PlanReceiptOrderPersonalAccountDto>(
                     entity));
        }
        public void UpdatePersonalAccount(PlanReceiptOrderPersonalAccountDto entity)
        {
            var repository = RepositoryFactory.Create <PlanReceiptOrderPersonalAccount>();
            var receiptOrderPersonalAccount = repository.Get(entity.Rn);

            if (receiptOrderPersonalAccount.State == PlanReceiptOrderPersonalAccountState.Confirm)
            {
                throw new CheckingSetStatePlanReceiptOrderInvalidException(Resource.PCO_16);
            }
            if (receiptOrderPersonalAccount.State == PlanReceiptOrderPersonalAccountState.Close)
            {
                throw new CheckingSetStatePlanReceiptOrderInvalidException(Resource.PCO_15);
            }

            repository.Evict(receiptOrderPersonalAccount);
            UpdateEntity <PlanReceiptOrderPersonalAccount, PlanReceiptOrderPersonalAccountDto>(entity);
        }
Esempio n. 4
0
 public virtual PlanReceiptOrderPersonalAccountDto AddPlanReceiptOrderPersonalAccount(
     PlanReceiptOrderPersonalAccountDto entity)
 {
     entity.Rn = 999;
     return(entity);
 }
Esempio n. 5
0
 public virtual void UpdatePersonalAccount(PlanReceiptOrderPersonalAccountDto entity)
 {
 }