コード例 #1
0
        public OfficeAccountBE GetOfficeAccount()
        {
            if (myOfficeAccount == null)
            {
                myOfficeAccount = new OfficeAccountBE(this);
            }

            return(myOfficeAccount);
        }
コード例 #2
0
        protected override void BeforeUpdate(DataRow row)
        {
            atriumDB.SRPRow dr = (atriumDB.SRPRow)row;
            this.BeforeChange(dr.Table.Columns["SRPDate"], dr);
            this.BeforeChange(dr.Table.Columns["SRPSubmittedDate"], dr);

            if (!dr.IsTaxationCompletedNull() &&
                dr.HasVersion(DataRowVersion.Original) && dr.IsNull(mySRPDT.TaxationCompletedColumn, DataRowVersion.Original))
            //!dr["TaxationCompleted", DataRowVersion.Original].Equals(dr["TaxationCompleted", DataRowVersion.Current]))
            {
                OfficeAccountBE agentAcc = this.myA.GetCLASMng().GetOfficeAccount();
                FileManager     fm       = myA.AtMng.GetFile(dr.FileID);

                decimal qraBalance = agentAcc.BalanceOn(dr.SRPDate);
                decimal srpTotal   = dr.TotalTaxed;
                decimal qrw        = 0;


                if (qraBalance != 0)
                {
                    if (srpTotal < qraBalance)
                    {
                        qrw = srpTotal;
                    }
                    else
                    {
                        qrw = qraBalance;
                    }
                    CLAS.OfficeAccountRow agentAccRow = (CLAS.OfficeAccountRow)agentAcc.Add(fm.CurrentFile);

                    agentAccRow.Amount          = -qrw;
                    agentAccRow.TransactionDate = dr.SRPDate;
                    agentAccRow.PostingDate     = DateTime.Today;
                    agentAccRow.Description     = "QR Withdrawal";
                    agentAccRow.Type            = "QW";
                    agentAccRow.SRPID           = dr.SRPID;
                }
            }
        }