Exemple #1
0
        public void Actualiza(ExtintorBE pItem, List <ExtintorDetalleBE> pListaExtintorDetalle)
        {
            try
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    ExtintorDL        Extintor        = new ExtintorDL();
                    ExtintorDetalleDL ExtintorDetalle = new ExtintorDetalleDL();

                    foreach (ExtintorDetalleBE item in pListaExtintorDetalle)
                    {
                        if (item.TipoOper == Convert.ToInt32(Operacion.Nuevo)) //Nuevo
                        {
                            item.IdExtintor = pItem.IdExtintor;
                            ExtintorDetalle.Inserta(item);
                        }
                        else
                        {
                            ExtintorDetalle.Actualiza(item);
                        }
                    }

                    Extintor.Actualiza(pItem);

                    ts.Complete();
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
Exemple #2
0
 public void Actualiza(ExtintorDetalleBE pItem)
 {
     try
     {
         ExtintorDetalleDL ExtintorDetalle = new ExtintorDetalleDL();
         ExtintorDetalle.Actualiza(pItem);
     }
     catch (Exception ex)
     { throw ex; }
 }