本文整理匯總了TypeScript中@eg/core/pcrud.service.PcrudService.autoApply方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript service.PcrudService.autoApply方法的具體用法?TypeScript service.PcrudService.autoApply怎麽用?TypeScript service.PcrudService.autoApply使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@eg/core/pcrud.service.PcrudService
的用法示例。
在下文中一共展示了service.PcrudService.autoApply方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
this.deleteSelected = (parts: IdlObject[]) => {
parts.forEach(part => part.isdeleted(true));
this.pcrud.autoApply(parts).subscribe(
val => console.debug('deleted: ' + val),
err => {},
() => this.partsGrid.reload()
);
};
示例2:
this.deleteSelected = (matchSets: IdlObject[]) => {
matchSets.forEach(matchSet => matchSet.isdeleted(true));
this.pcrud.autoApply(matchSets).subscribe(
val => console.debug('deleted: ' + val),
err => {},
() => this.grid.reload()
);
};
示例3:
() => {
// 2. Delete the now-empty subordinate parts. Note the
// delete must come after the part map changes are committed.
if (maps.length > 0) {
this.pcrud.autoApply(maps)
.toPromise().then(() => this.deleteParts());
} else {
this.deleteParts();
}
}
示例4: deleteParts
deleteParts() {
const parts = this.parts.filter(p => Number(p.id()) !== this.leadPart);
parts.forEach(p => p.isdeleted(true));
this.pcrud.autoApply(parts).toPromise().then(res => this.close(res));
}