>>protected override void HookConstructor() >> { >> this.AutoSaveOnParentSaved = true; >> this.AutoCancelOnParentCancel = true; >> this.AutoDeleteOnParentDeleted = true; >> this.AutoEmptyOnParentAdded = true; >> this.ForeignParentKeyField = "insert FK here"; >> } >>>>
protected override void DefineParticipatingObjects() >>> { >>> this.oPolicyHeader = (PolicyHeader)this.RegisterBizObj(new PolicyHeader()); >>> this.oPolicy = (Policy)this.RegisterBizObj(new Policy()); >>> this.oPolicyLoan = (PolicyLoan)this.RegisterBizObj(new PolicyLoan()); >>> this.oReceipt = (Receipt)this.RegisterBizObj(new Receipt()); >>> this.oReceiptDetail = (ReceiptDetail)this.RegisterBizObj(new ReceiptDetail()); >>> >>> this.oPolicyHeader.RegisterChildBizObj(this.oPolicy); >>> this.oPolicyHeader.RegisterChildBizObj(this.oPolicyLoan); >>> this.oPolicyHeader.RegisterChildBizObj(this.oReceipt); >>> this.oReceipt.RegisterChildBizObj(this.oReceiptDetail); >>> }>>>
mmSaveDataResult result = oPolicyHeader.SaveEntity();>>>