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); }
public virtual PlanReceiptOrderPersonalAccountDto AddPlanReceiptOrderPersonalAccount( PlanReceiptOrderPersonalAccountDto entity) { entity.Rn = 999; return(entity); }
public virtual void UpdatePersonalAccount(PlanReceiptOrderPersonalAccountDto entity) { }