public void AddOtherFee(long typeId) { if (CurrentPaymentAdvice == null) throw new ApasInvaidOperationException( "Invalid Operation: No payment advice is selected."); //SECURITY CHECK HERE. Lock check here OtherFeeType objOFT = new OtherFeeType(typeId); OtherFee objOF = new OtherFee(CurrentPaymentAdvice, objOFT); objOF.Save(); //log CurrentPaymentAdvice.LastAction = "Add OtherFee"; CurrentPaymentAdvice.LastModifiedBy = ApasAccessControlManager.GetCurrentInstance().LogonUser.Id; CurrentPaymentAdvice.LastModifiedTime = DateTime.Now; CurrentPaymentAdvice.Save(); }
public void AddOtherFee(string typeName) { if (CurrentPaymentAdvice == null) throw new ApasInvaidOperationException( "Invalid Operation: No payment advice is selected."); //SECURITY CHECK HERE. Lock check here OtherFeeType objOFT; IList<OtherFeeType> sList = OtherFeeType.FindByName(typeName); if (sList.Count == 0) { //not exists yet. create. objOFT = new OtherFeeType(typeName); objOFT.Save(); } else { objOFT = sList[0]; } OtherFee objOF = new OtherFee(CurrentPaymentAdvice, objOFT); objOF.Save(); //log CurrentPaymentAdvice.LastAction = "Add OtherFee"; CurrentPaymentAdvice.LastModifiedBy = ApasAccessControlManager.GetCurrentInstance().LogonUser.Id; CurrentPaymentAdvice.LastModifiedTime = DateTime.Now; CurrentPaymentAdvice.Save(); }