public GenerarMonitoreo_Response GenerarMonitoreo(GenerarMonitoreo_Request obj)
 {
     try
     {
         return(PlanificarBL.GenerarMonitoreo(obj));
     }
     catch (Exception)
     {
         throw;
     }
 }
        public GenerarMonitoreo_Response GenerarMonitoreo(GenerarMonitoreo_Request obj)
        {
            GenerarMonitoreo_Response retorno = new GenerarMonitoreo_Response();

            try
            {
                using (SqlConnection conection = new SqlConnection(ConfigurationManager.ConnectionStrings["cnxIndra"].ConnectionString))
                {
                    conection.Open();

                    using (SqlCommand command = new SqlCommand("[pa_spi_proyecto_monitoreo]", conection))
                    {
                        command.CommandType = CommandType.StoredProcedure;
                        command.Parameters.AddWithValue("@vi_nid_portafolio", obj.nid_portafolio);
                        command.Parameters.AddWithValue("@vi_nid_proyecto", obj.nid_proyecto);
                        using (SqlDataReader dr = command.ExecuteReader())
                        {
                            if (dr.HasRows)
                            {
                                while (dr.Read())
                                {
                                    if ((dr.GetInt32(dr.GetOrdinal("nid_retorno")) > 0))
                                    {
                                        retorno.respuesta   = 1;
                                        retorno.str_mensaje = dr.GetString(dr.GetOrdinal("msj_retorno"));
                                    }
                                    else
                                    {
                                        retorno.respuesta   = 0;
                                        retorno.str_mensaje = "No se generó el monitoreo, debido a que hubo error en los datos";
                                    }
                                }
                            }
                        }
                    }
                    conection.Close();
                }
                return(retorno);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
        public GenerarMonitoreo_Response GenerarMonitoreo(GenerarMonitoreo_Request entidad)
        {
            try
            {
                GenerarMonitoreo_Response response = new GenerarMonitoreo_Response();
                string texto = "";
                response = planificarDA.GenerarMonitoreo(entidad);
                if (response.respuesta == 0)
                {
                    return(response);
                }
                else
                {
                    texto = response.str_mensaje + "<br>" + texto;
                }

                return(response);
            }
            catch (Exception)
            {
                throw;
            }
        }