Example #1
0
        public static List <Privilegio> getPrivilegioRol(int eventoId, int rolId)
        {
            List <Privilegio> lp = new List <Privilegio>();
            DBTransaction     db = new DBTransaction();
            DataView          dv = db.GetDataView(string.Format("acre.fPrivilegiosRoles ({0},{1})", eventoId, rolId)).DefaultView;

            dv.Sort = "ParametroTipoPrivilegioId, Orden";
            DataTable dt       = dv.ToTable();
            string    _columna = "";

            foreach (DataRow dr in dt.Rows)
            {
                Privilegio p = ConvertToPrivilegios(dr);
                if (_columna == p.ParametroDescripcion)
                {
                    p.ParametroDescripcion = "";
                }
                else
                {
                    _columna = p.ParametroDescripcion;
                }
                lp.Add(p);
            }
            return(lp);
        }
Example #2
0
        public static List <Grupo> GetGruposEquipos(int deporteId, int ramaId, int eventoId, int faseId)
        {
            List <Grupo>        lg = new List <Grupo>();
            List <SqlParameter> lp = new List <SqlParameter>();

            lp.Add(new SqlParameter("DeporteId", deporteId));
            lp.Add(new SqlParameter("RamaId", ramaId));
            lp.Add(new SqlParameter("EventoId", eventoId));
            lp.Add(new SqlParameter("FaseId", faseId));
            DataTable dt = ExecuteTransaction("[conj].[pGetGruposEvento]", lp);

            foreach (DataRow dr in dt.Rows)
            {
                Grupo gr = new Grupo();
                gr = gr.ConvertToGrupo(dr);
                DBTransaction db  = new DBTransaction();
                DataTable     dt1 = db.GetDataView(String.Format("[prog].[fGetEquiposGrupo] ({0})", gr.GrupoId));
                gr.GrupoEquipos = new List <GrupoEquipo>();
                foreach (DataRow dr1 in dt1.Rows)
                {
                    GrupoEquipo ge = new GrupoEquipo();
                    ge = GrupoEquipo.ConvertToGrupoEquipo(dr1);
                    gr.GrupoEquipos.Add(ge);
                }
                lg.Add(gr);
            }
            return(lg);
        }
Example #3
0
        public static DataTable GetInscripcionEvento(int EventoId)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format("[acre].[vAcreditacionDetallePersona] where [EventoId]= {0}", EventoId));

            return(dt);
        }
Example #4
0
        public static DataTable GetGestionesEventos()
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView("SELECT DISTINCT Gestion from EventosDeportivo");

            return(dt);
        }
Example #5
0
        public static DataTable getEquiposJornada(int EventoId, int PruebaEventoId, int JornadaId)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format(" golf.fGetEquiposJornada ({0},{1},{2})", EventoId, PruebaEventoId, JornadaId));

            return(dt);
        }
Example #6
0
        public static DataTable GetGolfHoyoPar(string sql)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format("[golf].[HoyoPar]  {0}", sql));

            return(dt);
        }
Example #7
0
        public static DataTable GetJugadores(int grupoId)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format("[golf].[vGetCompetidorJornada] where [GrupoId] = {0}", grupoId));

            return(dt);
        }
Example #8
0
        public static DataTable GetDeportesEvento(int eventoId)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format("SELECT EventoDeportivoId, DisciplinaId, Nombre, Color, DependienteId from vGetDeportesEvento WHERE EventoDeportivoId = {0}", eventoId));

            return(dt);
        }
Example #9
0
        public static DataTable getSucesoPartido(int competidorId, int planillaId, int deporteId, int control, int visor, int deportePeriodoId)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format("conj.fSucesosPartido ({0},{1},{2},{3},{4},{5}) order by Orden", competidorId, planillaId, deporteId, control, visor, deportePeriodoId));

            return(dt);
        }
Example #10
0
        public static DataTable GetGolfHoyoPar(int tipoHoyoId)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format("[golf].[HoyoPar] WHERE Tipo = {0}", tipoHoyoId));

            return(dt);
        }
Example #11
0
        public static DataTable GetGestionesEventos(int eventoId)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format("vGetDeportes WHERE v.Activo = 1 AND v.DependienteId > 0 AND v.DisciplinaId not in (SELECT e.DisciplinaId FROM [EventoDeportivoDisciplinas] e WHERE e.EventoDeportivoId = {0})", eventoId));

            return(dt);
        }
Example #12
0
        public static DataTable GetGolfCompetidorByPersonaId(int personaId)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format("[golf].[vPersonas] where [PersonaId] = {0}", personaId));

            return(dt);
        }
Example #13
0
        public static DataTable GetDetalleAcreditacionPersona(int PersonaId)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format("[acre].[vAcreditacionDetallePersona] where [PersonaId]= {0}", PersonaId));

            return(dt);
        }
Example #14
0
        public static List <Ticket> GetTickets()
        {
            int           x   = -1;
            List <Ticket> lcp = new List <Ticket>();
            DBTransaction db  = new DBTransaction();
            DataTable     dt  = db.GetDataView("erp.vTicket");

            foreach (DataRow dr in dt.Rows)
            {
                Ticket cp = ConvertToTicket(dr);
                if (cp.estado == "False" && (cp.fecha.CompareTo(DateTime.Now.ToShortDateString())) == 1)
                {
                    lcp.Add(cp);
                    x++;
                }
            }
            if (x == -1)
            {
                return(null);
            }
            else
            {
                return(lcp);
            }
        }
Example #15
0
        public static DataTable GetGolpes(int competidorJornadaId, int hoyoParId)
        {
            DBTransaction db = new DBTransaction();

            return(db.GetDataView(string.Format("[golfJugadas] WHERE [CompetidorJornadaId] = {0} and [HoyoParId] = {1}", competidorJornadaId, hoyoParId)));
            //dbTools.Sql = string.Format("SELECT [Golpes] FROM [golfJugadas] WHERE [CompetidorJornadaId] = {0} and [HoyoParId] = {1}", competidorJornadaId, hoyoParId);
        }
Example #16
0
        public static DataTable getFechaEvento(int eventoId)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format("erp.fGetFechasEvento ({0})", eventoId));

            return(dt);
        }
Example #17
0
        public static DataTable GetGruposEvento(int pruebaEventoId)
        {
            DBTransaction db = new DBTransaction();
            var           dt = db.GetDataView($"[prog].[fGetGruposPruebasEvento] ({pruebaEventoId})");

            return(dt);
        }
Example #18
0
        public static DataTable getDenuncias()
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView("den.Denuncias");

            return(dt);
        }
Example #19
0
        public static DataTable GetGruposDeportes(int eventoId, int deporteId, int parametroRamaId = 0)
        {
            DataTable     dt = new DataTable();
            DBTransaction db = new DBTransaction();

            dt = db.GetDataView(string.Format("[conj].[fGetGruposDeporte]({0},{1},{2})", eventoId, deporteId, parametroRamaId));
            return(dt);
        }
Example #20
0
        public static DataTable GetCompetidor(int cronogramaId, int posicion)
        {
            DataTable     dt = new DataTable();
            DBTransaction db = new DBTransaction();

            dt = db.GetDataView(string.Format("[indv].[fGetCompetidoresDatos]({0},{1})", cronogramaId, posicion));
            return(dt);
        }
Example #21
0
        public static DataTable GetCompetidoresPrueba(int cronogramaId)
        {
            DataTable     dt = new DataTable();
            DBTransaction db = new DBTransaction();

            dt = db.GetDataView(string.Format("[indv].[fGetCompetidoresPrueba]({0}) order by Posicion, Sembrado", cronogramaId));
            return(dt);
        }
Example #22
0
        public static DataTable GetTotalesFinalesReporte(int jornada, int categoria)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetDataView(string.Format("[vGolfTotalJornada] where [Neto] is not null and jornadaId = {0} and CategoriaId = {1} order by CompetidorId asc", jornada, categoria));

            //dbTools.Sql = string.Format("select [CompetidorId],[Nombres],[Handicap(80%)],[1RA],[2DA],[Gross],[Neto] from [vGolfTotalJornada] where [Neto] is not null and jornadaId = {0} and CategoriaId = {1} order by CompetidorId asc", jornada, categoria);
            return(dt);
        }
Example #23
0
        public static DataTable GetPuntosGenerico(int PlanillaId, int DeportePeriodoId)
        {
            DataTable     dt = new DataTable();
            DBTransaction db = new DBTransaction();

            dt = db.GetDataView(string.Format("[conj].[fGetPuntosPlanilla]({0},{1})", PlanillaId, DeportePeriodoId));
            return(dt);
        }
Example #24
0
        public static DataTable GetGelegacion(int competidorId, int eventoId)
        {
            DataTable     dt = new DataTable();
            DBTransaction db = new DBTransaction();

            dt = db.GetDataView(string.Format("[acre].[fGetDelegacion]({0},{1})", competidorId, eventoId));
            return(dt);
        }
Example #25
0
        public static DataTable GetPuntosSet(int planillaId, int deportePeriodoId)
        {
            DataTable     dt = new DataTable();
            DBTransaction db = new DBTransaction();

            dt = db.GetDataView(string.Format("[conj].[fGetPuntosSet]({0},{1})", planillaId, deportePeriodoId));
            return(dt);
        }
Example #26
0
        public static DataTable GetVolleyPuntos(int cronogramaId)
        {
            DataTable     dt = new DataTable();
            DBTransaction db = new DBTransaction();

            dt = db.GetDataView(string.Format("[conj].[fGetResultadosVoley]({0})", cronogramaId));
            return(dt);
        }
Example #27
0
        public static DataTable getEquipoPersona(int competidorId)
        {
            DataTable     dt = new DataTable();
            DBTransaction db = new DBTransaction();

            dt = db.GetDataView(string.Format("[conj].[fGetPlanillaEquipoPersona]({0})", competidorId));
            return(dt);
        }
Example #28
0
        public static DataTable GetPuntosBaloncesto(int PlanillaId)
        {
            DataTable     dt = new DataTable();
            DBTransaction db = new DBTransaction();

            dt = db.GetDataView(string.Format("[conj].[fGetPuntosBaloncesto]({0})", PlanillaId));
            return(dt);
        }
Example #29
0
        public static DataTable fGetLecciones(int EventoId)
        {
            DataTable     dt = new DataTable();
            DBTransaction db = new DBTransaction();

            dt = db.GetDataView(string.Format("[ecue].[fGetLecciones]({0}) order by Leccion", EventoId));
            return(dt);
        }
Example #30
0
        public static DataTable GetCategoria(int pruebaEventoId)
        {
            DataTable     dt = new DataTable();
            DBTransaction db = new DBTransaction();

            dt = db.GetDataView(string.Format("[prog].[fGetCategoria]({0})", pruebaEventoId));
            return(dt);
        }