コード例 #1
0
        public PlanReceiptOrderPersonalAccountDto GetPlanReceiptOrderPersonalAccount(long id)
        {
            PlanReceiptOrderPersonalAccountDto result =
                GetEntity <PlanReceiptOrderPersonalAccount, PlanReceiptOrderPersonalAccountDto>(id);

            return(result);
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public virtual PlanReceiptOrderPersonalAccountDto AddPlanReceiptOrderPersonalAccount(
     PlanReceiptOrderPersonalAccountDto entity)
 {
     entity.Rn = 999;
     return(entity);
 }
コード例 #5
0
 public virtual void UpdatePersonalAccount(PlanReceiptOrderPersonalAccountDto entity)
 {
 }