public Int32 Inserta(ProgramProductionBE pItem, List <ProgramProductionDetailBE> pListaProgramProductionDetail)
        {
            try
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    ProgramProductionDL       ProgramProduction       = new ProgramProductionDL();
                    ProgramProductionDetailDL ProgramProductionDetail = new ProgramProductionDetailDL();

                    int IdProgramProduction = 0;
                    IdProgramProduction = ProgramProduction.Inserta(pItem);

                    foreach (var item in pListaProgramProductionDetail)
                    {
                        item.IdProgramProduction = IdProgramProduction;
                        ProgramProductionDetail.Inserta(item);
                    }

                    ts.Complete();

                    return(IdProgramProduction);
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
        public void Actualiza(ProgramProductionBE pItem, List <ProgramProductionDetailBE> pListaProgramProductionDetail)
        {
            try
            {
                using (TransactionScope ts = new TransactionScope())
                {
                    ProgramProductionDL       ProgramProduction       = new ProgramProductionDL();
                    ProgramProductionDetailDL ProgramProductionDetail = new ProgramProductionDetailDL();

                    foreach (var item in pListaProgramProductionDetail)
                    {
                        if (item.TipoOper == Convert.ToInt32(Operacion.Nuevo)) //Nuevo
                        {
                            item.IdProgramProduction = pItem.IdProgramProduction;
                            ProgramProductionDetail.Inserta(item);
                        }
                        else
                        {
                            ProgramProductionDetail.Actualiza(item);
                        }
                    }


                    ProgramProduction.Actualiza(pItem);

                    ts.Complete();
                }
            }
            catch (Exception ex)
            { throw ex; }
        }
 public void Inserta(ProgramProductionDetailBE pItem)
 {
     try
     {
         ProgramProductionDetailDL ProgramProductionDetail = new ProgramProductionDetailDL();
         ProgramProductionDetail.Inserta(pItem);
     }
     catch (Exception ex)
     { throw ex; }
 }