public void AddAlertBill(AlertBill alertBill) { //添加BillId alertBill.BillId = this.GetNextAlertBillID(); this._helper.AddDomainObject(alertBill); }
public void DeleteAlertBill(AlertBill alertBill) { this._helper.DeleteDomainObject(alertBill, new ICheck[] { new DeleteAssociateCheck(alertBill, this.DataProvider, new Type[] { typeof(AlertNotifier) }) }); }
protected override void DeleteDomainObjects(ArrayList domainObjects) { try { this.DataProvider.BeginTransaction(); for (int i = 0; i < domainObjects.Count; i++) { AlertBill alert = domainObjects[i] as AlertBill; if (alert != null) { object[] objs = _alertBillFacade.QueryAlertNotifier(alert.BillId); if (objs != null) { foreach (object obj in objs) { AlertNotifier an = obj as AlertNotifier; if (an != null) { _alertBillFacade.DeleteAlertNotifier(an); } } } } if (alert.AlertType == AlertType_Old.ResourceNG) { _alertBillFacade.DeleteAlertResBill((AlertResBill)alert); } else { _alertBillFacade.DeleteAlertBill(alert); } } this.DataProvider.CommitTransaction(); } catch (System.Exception ex) { this.DataProvider.RollbackTransaction(); throw ex; } }
public void UpdateAlertBill(AlertBill alertBill) { this._helper.UpdateDomainObject(alertBill); }