public dynamic ObtenerCheckListCompleto(int organizacionID, int turno, int roladoraId)
 {
     try
     {
         Logger.Info();
         var checkListRoladoraDetalleDAL = new Integracion.DAL.Implementacion.CheckListRoladoraDetalleDAL();
         List <CheckListRoladoraDetalleInfo> checkListRoladoraDetalle =
             checkListRoladoraDetalleDAL.ObtenerCheckListCompleto(organizacionID, turno, roladoraId);
         dynamic checkListCompletado = ValidarCheckListCompletado(checkListRoladoraDetalle);
         return(checkListCompletado);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
Example #2
0
        private void GuardarCheckListTurnoExistente(CheckListRoladoraInfo checkListRoladora
                                                    , CheckListRoladoraGeneralInfo checkListRoladoraGeneral
                                                    , List <CheckListRoladoraDetalleInfo> checkListRoladoraDetalle
                                                    , List <CheckListRoladoraHorometroInfo> listaCheckListRoladoraHorometro)
        {
            using (var transaction = new TransactionScope())
            {
                var checkListRoladoraGeneralDAL = new Integracion.DAL.Implementacion.CheckListRoladoraGeneralDAL();
                checkListRoladoraGeneralDAL.Actualizar(checkListRoladoraGeneral);

                var checkListRoladoraDALAnterior = new Integracion.DAL.Implementacion.CheckListRoladoraDAL();
                int checkListoRoladoraID         = checkListRoladoraDALAnterior.Crear(checkListRoladora);

                if (checkListRoladoraDetalle != null && checkListRoladoraDetalle.Any())
                {
                    checkListRoladoraDetalle.ForEach(ids => ids.CheckListRoladoraID = checkListoRoladoraID);
                    var checkListoRoladoraDetalleDAL = new Integracion.DAL.Implementacion.CheckListRoladoraDetalleDAL();
                    checkListoRoladoraDetalleDAL.Crear(checkListRoladoraDetalle);
                }
                transaction.Complete();
            }
        }