Exemple #1
0
        public int UpdateInvoice(BMS_DAL.DS.BMSDS.TInvoicesDataTable dt)
        {
            int r = 0;

            if (dt.GetChanges() != null)
            {
                using (BMS_DAL.DS.BMSDSTableAdapters.TInvoicesTableAdapter ta = new BMS_DAL.DS.BMSDSTableAdapters.TInvoicesTableAdapter())
                {
                    r = ta.UpdateWithTrans(dt);
                }
            }
            return(r);
        }
Exemple #2
0
        public int UpdateWithTrans(BMS_DAL.DS.BMSDS.TInvoicesDataTable dt)
        {
            int r = 0;

            using (System.Transactions.TransactionScope ts = new System.Transactions.TransactionScope())
            {
                try
                {
                    r = this.Adapter.Update(dt);
                    ts.Complete();
                }
                catch (Exception ex) { throw ex; }
            }
            return(r);
        }