Esempio n. 1
0
        public void AddAlertBill(AlertBill alertBill)
        {
            //添加BillId
            alertBill.BillId = this.GetNextAlertBillID();

            this._helper.AddDomainObject(alertBill);
        }
Esempio n. 2
0
 public void DeleteAlertBill(AlertBill alertBill)
 {
     this._helper.DeleteDomainObject(alertBill,
                                     new ICheck[] { new DeleteAssociateCheck(alertBill,
                                                                             this.DataProvider,
                                                                             new Type[] {
             typeof(AlertNotifier)
         }) });
 }
Esempio n. 3
0
        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;
            }
        }
Esempio n. 4
0
 public void UpdateAlertBill(AlertBill alertBill)
 {
     this._helper.UpdateDomainObject(alertBill);
 }