Example #1
0
        public Object GetGolfCategorias(int eventoId)
        {
            Datos data = new Datos();

            data.data = GolfCategoria.GetGolCategorias(eventoId);
            return(data);
        }
Example #2
0
        public void TestGetGolCategoria()
        {
            GolfCategoria gc = new GolfCategoria();

            gc = GolfCategoria.GetGolCategoria(13);

            GolfCategoria gc1 = new GolfCategoria();

            gc1.CategoriaId       = 13;
            gc1.Descripcion       = "CATEGORIA A (0 - 16)";
            gc1.EventoDeportivoId = 2;
            gc1.Porcentaje        = 80.0;

            Assert.AreEqual(gc1.Descripcion, gc.Descripcion);
        }
        public static string ReporteJornadaInscritos(DataTable dtInscritos, string pathSendet, int eventoid, int categoriaId, int jornadaId)
        {
            try
            {
                pathResource = pathSendet;
                fileName     = string.Format("Jornadas=){0:yyMMdd_HHmmss}.pdf", DateTime.Now);
                path         = string.Format(@"{0}\Reportes\{1}", pathResource, fileName);
                pathImage    = string.Format(@"{0}\Images\", pathResource);
                DataTable dt = EventoDeportivo.GetEventoName(eventoid);



                HeaderGolf header = new HeaderGolf();
                header.Titulo       = dt.Rows.Count > 0 ? dt.Rows[0]["Nombre"].ToString().ToUpper() : "";
                header.TituloIdioma = "";
                header.SubTitulo    = dt.Rows.Count > 0 ? dt.Rows[0]["Ubicacion"].ToString().ToUpper() : "";
                header.Categoria    = categoriaId == 0 ? "Todos" : GolfCategoria.GetGolCategoria(categoriaId).Descripcion;
                header.Fecha        = GolfJornada.GetFechasJornadas(eventoid);
                var jornada = GolfJornada.GetGolfJornada(jornadaId);
                header.Jornada = jornadaId == 0? "Todos" : jornada.Descripcion;

                SetHead(header);
                //dtInscritos.Columns.Remove("PersonaId");

                SetBody(dtInscritos, header.Titulo, jornada.Descripcion, jornada.Fecha?.ToString("dd MMM yyyy"));
                dt.Dispose();
                return(path);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                SetFooter();
            }
        }
Example #4
0
 public bool SaveGolfCategoria([FromBody] GolfCategoria categoria)
 {
     return(categoria.Save());
 }
Example #5
0
 public GolfCategoria GetGolCategoria(int categoriaId)
 {
     return(GolfCategoria.GetGolCategoria(categoriaId));
 }
Example #6
0
        public bool DeleteGolfCategoria(int categoriaId)
        {
            GolfCategoria gc = new GolfCategoria();

            return(gc.Delete(categoriaId));
        }