protected override void AfterAdd(DataRow row) { CLAS.JudgmentRow dr = (CLAS.JudgmentRow)row; string ObjectName = this.myJudgmentDT.TableName; dr.JudgmentID = this.myA.AtMng.PKIDGet(ObjectName, 1); dr.FileID = myA.FM.CurrentFile.FileId; dr.CombineAccountsAfterJudgment = false; dr.OfficeID = this.myA.FM.CurrentFile.LeadOfficeId; //copy over active accounts JudgmentAccountBE jaBE = this.myA.GetJudgmentAccount(); foreach (CLAS.DebtRow debtr in this.myA.DB.Debt) { //&& debtr.IsClosureCodeNull() if (debtr.ActiveWithJustice) // && debtr.OfficeID==debtr.EFileRow.LeadOfficeId) JLL 2010-08-11 Review this check { CLAS.JudgmentAccountRow jar = (CLAS.JudgmentAccountRow)jaBE.Add(dr); jar.BeginEdit(); jar.FileAccountID = debtr.FileAccountId; jar.AccountTypeCode = debtr.AccountTypeCode; jar.AccountTypeId = debtr.AccountTypeId; jar.AccountTypeDescEng = debtr.AccountTypeDescEng; jar.AccountTypeDescFre = debtr.AccountTypeDescEng; jar.DARSAccountType = debtr.DARSAccountType; jar.AccountPrincipal = debtr.PrincipalAmount; jar.Include = true; jar.EndEdit(); } } }
protected override void AfterChange(DataColumn dc, DataRow ddr) { string ObjectName = this.myJudgmentAccountDT.TableName; CLAS.JudgmentAccountRow dr = (CLAS.JudgmentAccountRow)ddr; switch (dc.ColumnName) { case JudgmentAccountFields.CostAmount: case JudgmentAccountFields.PreJudgmentInterestAmount: case JudgmentAccountFields.PrincipalAmountBeforeJudgment: if (!dr.IsCostAmountNull() && !dr.IsPreJudgmentInterestAmountNull() && !dr.IsPrincipalAmountBeforeJudgmentNull()) { dr.JudgmentAmount = dr.CostAmount + dr.PreJudgmentInterestAmount + dr.PrincipalAmountBeforeJudgment; dr.EndEdit(); } break; case "Include": break; } }