コード例 #1
0
ファイル: PaymentAdvice.cs プロジェクト: khtutz/anet4jkhz
        /// <summary>
        /// Constructor to create "new" PaymentAdvices.
        /// New paymentAdvices will be created "unlocked".
        /// </summary>
        /// <param name="parentPAList">Parent PaymentAdviceList: must assign to create PaymentAdvice</param>
        /// <param name="StudId">Student Id: must assign a valid student id to create PaymentAdvice</param>
        public PaymentAdvice(PaymentAdviceList parentPAList, int StudId)
        {
            if (parentPAList == null)
                throw new ApasInvaidOperationException(
                    "Invalid Operation: Unable to create a PaymentAdvice without " +
                    "a valid parent PaymentAdviceList.");

            _IsLocked=false;
            IdStudent = StudId;
            IsFrozen=0;
            IsExcluded=0;
            IdLockHolder=null;
            LockKey = null;
            ClassFees = new Dictionary<int, ClassFee>();
            OtherFees = new Dictionary<long, OtherFee>();
            LastAction = "Create";
            LastModifiedTime = DateTime.Now;
            LastModifiedBy = ApasAccessControlManager.GetCurrentInstance().LogonUser.Id;

            parentPAList.AddPaymentAdvice(this);
        }