/// <summary>
 /// Obtiene el reporte kardex de ganado.
 /// </summary>
 /// <returns></returns>
 public IList <ReporteKardexGanadoInfo> Generar(FiltroParametrosKardexGanado filtro)
 {
     try
     {
         Logger.Info();
         Dictionary <string, object> parameters = AuxReporteKardexGanadoDAL.Generar(filtro);
         DataSet ds = Retrieve("ReporteKardexDeGanado", parameters);
         IList <ReporteKardexGanadoInfo> result = null;
         if (ValidateDataSet(ds))
         {
             result = MapReporteKardexGanadoDal.Generar(ds);
         }
         return(result);
     }
     catch (SqlException ex)
     {
         Logger.Error(ex);
         throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
     }
     catch (DataException ex)
     {
         Logger.Error(ex);
         throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
        /// <summary>
        /// Obtiene una lista paginada de ReporteMuertesGanado
        /// </summary>
        /// <param name="filtro"></param>
        /// <returns></returns>
        public IList <ReporteKardexGanadoInfo> Generar(FiltroParametrosKardexGanado filtro)
        {
            IList <ReporteKardexGanadoInfo> lista = null;

            try
            {
                Logger.Info();
                lista = reportekardexGanadoDL.Generar(filtro);
            }
            catch (ExcepcionGenerica)
            {
                throw;
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }

            return(lista);
        }
示例#3
0
 /// <summary>
 /// Obtiene parametros para obtener el reporte de kardex de ganado.
 /// </summary>
 /// <param name="filtro"></param>
 /// <returns></returns>
 public static Dictionary <string, object> Generar(FiltroParametrosKardexGanado filtro)
 {
     try
     {
         Logger.Info();
         var parametros =
             new Dictionary <string, object>
         {
             { "@OrganizacionID", filtro.OrgazizacionId },
             { "@TipoProceso", filtro.TipoProceso },
             { "@FechaFin", filtro.FechaFin },
             { "@FechaInicio", filtro.FechaInicio },
         };
         return(parametros);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
        /// <summary>
        /// Obtener el reporte de kardex
        /// </summary>
        /// <param name="filtro"></param>
        /// <returns></returns>
        public IList <ReporteKardexGanadoInfo> Generar(FiltroParametrosKardexGanado filtro)
        {
            IList <ReporteKardexGanadoInfo> result = null;

            try
            {
                Logger.Info();
                var reporteBl = new ReporteKardexGanadoBL();
                result = reporteBl.Generar(filtro);
            }
            catch (ExcepcionGenerica)
            {
                throw;
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }
            return(result);
        }
示例#5
0
        private IList <ReporteKardexGanadoInfo> ObtenerReporteKardexGanado()
        {
            try
            {
                var reporte = new ReporteKardexGanadoPL();

                int iOranizacion = cmbOrganizacion.SelectedItem != null
                                        ? (int)cmbOrganizacion.SelectedValue
                                        : 0;

                int iTipoProceso = cmbTipoProceso.SelectedItem != null
                                        ? (int)cmbTipoProceso.SelectedValue
                                        : 0;

                DateTime fechaInicio = DtpFechaInicio.SelectedDate.HasValue
                                        ? DtpFechaInicio.SelectedDate.Value
                                        : new DateTime();

                DateTime fechaFin = DtpFechaFin.SelectedDate.HasValue
                                        ? DtpFechaFin.SelectedDate.Value
                                        : new DateTime();

                var filtro = new FiltroParametrosKardexGanado
                {
                    OrgazizacionId = iOranizacion,
                    TipoProceso    = iTipoProceso,
                    FechaInicio    = fechaInicio,
                    FechaFin       = fechaFin
                };

                var resultadoInfo = reporte.Generar(filtro);

                return(resultadoInfo);
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }
        }