예제 #1
0
 public static void asnSetDescargada(Asn oAsn, IDbTransaction tran)
 {
     try
     {
         AsnMng oMng = new AsnMng()
         {
             O_Asn = oAsn
         };
         oMng.setDescargada(tran);
     }
     catch
     {
         throw;
     }
 }
예제 #2
0
        public static List <Asn> asnLst()
        {
            List <Asn> lst = new List <Asn>();

            try
            {
                AsnMng oMng = new AsnMng();
                oMng.getLstConcentrado();
                lst = oMng.Lst;
            }
            catch
            {
                throw;
            }
            return(lst);
        }
예제 #3
0
        public static void asnAdd(Asn o)
        {
            IDbTransaction tran = null;
            AsnMng         oMng = new AsnMng()
            {
                O_Asn = o
            };
            Asn_partidaMng          oAPMng  = new Asn_partidaMng();
            Asn_transporte_selloMng oATSMng = new Asn_transporte_selloMng();

            try
            {
                tran = GenericDataAccess.BeginTransaction();

                string folio = CatalogoCtrl.getFolio(enumTipo.ASN, tran);
                o.Folio = folio;
                oMng.add(tran);

                foreach (Asn_partida item in o.PLstPartida)
                {
                    item.Id_asn          = o.Id;
                    oAPMng.O_Asn_partida = item;
                    oAPMng.add(tran);
                }

                foreach (Asn_transporte_sello itemSello in o.PLstTranSello)
                {
                    itemSello.Id_asn = o.Id;
                    oATSMng.O_Asn_transporte_sellos = itemSello;
                    oATSMng.add(tran);
                }

                GenericDataAccess.CommitTransaction(tran);
            }
            catch
            {
                if (tran != null)
                {
                    GenericDataAccess.RollbackTransaction(tran);
                }
                throw;
            }
        }