Ejemplo n.º 1
0
        public int UpdateInvoiceDetail(BMS_DAL.DS.BMSDS.TInvoiceDetailsDataTable dt)
        {
            int r = 0;

            if (dt.GetChanges() != null)
            {
                using (BMS_DAL.DS.BMSDSTableAdapters.TInvoiceDetailsTableAdapter ta = new BMS_DAL.DS.BMSDSTableAdapters.TInvoiceDetailsTableAdapter())
                {
                    r = ta.UpdateWithTrans(dt);
                }
            }
            return(r);
        }
Ejemplo n.º 2
0
        public int UpdateWithTrans(BMS_DAL.DS.BMSDS.TInvoiceDetailsDataTable 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);
        }