Example #1
0
        private DataTable ExecuteTransaction(string procedureName, List <SqlParameter> ps)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetStoreProcedure(procedureName, ps);

            return(dt);
        }
Example #2
0
        public int InsDenunciante()
        {
            List <SqlParameter> ps = new List <SqlParameter>();
            DBTransaction       db = new DBTransaction();

            ps.Add(new SqlParameter("@ComplaintId", this.ComplaintId));
            ps.Add(new SqlParameter("@Name", this.Denunciante.Name));
            ps.Add(new SqlParameter("@SecondName", this.Denunciante.SecondName));
            ps.Add(new SqlParameter("@LastName", this.Denunciante.LastName));
            ps.Add(new SqlParameter("@SecondLastName", this.Denunciante.SecondLastName));
            ps.Add(new SqlParameter("@NroDocument", this.Denunciante.NroDocument));
            ps.Add(new SqlParameter("@ParameterExtent", this.Denunciante.ParameterExtent));
            ps.Add(new SqlParameter("@ParameterGender", this.Denunciante.ParameterGender));
            ps.Add(new SqlParameter("@BirthDate", this.Denunciante.BirthDate));
            ps.Add(new SqlParameter("@ParameterCivilStatus", this.Denunciante.ParameterCivilStatus));
            ps.Add(new SqlParameter("@ParameterNationality", this.Denunciante.ParameterNationality));
            ps.Add(new SqlParameter("@Address", this.Denunciante.Address));
            ps.Add(new SqlParameter("@Phone", this.Denunciante.Phone));
            ps.Add(new SqlParameter("@Occupation", this.Denunciante.Occupation));
            ps.Add(new SqlParameter("@Workplace", this.Denunciante.Workplace));
            ps.Add(new SqlParameter("@WPhone", this.Denunciante.wPhone));
            ps.Add(new SqlParameter("@WAddress", this.Denunciante.wAddress));

            DataTable dt = db.GetStoreProcedure("den.InsDenunciante", ps);

            return(Convert.ToInt32(dt.Rows[0]["ComplainantId"]));
        }
Example #3
0
        public static List <Cronograma> GetCronogramaConjunto(int deporteId, Nullable <DateTime> fecha, int eventoId)
        {
            List <Cronograma>   lcr = new List <Cronograma>();
            DBTransaction       db  = new DBTransaction();
            List <SqlParameter> ps  = new List <SqlParameter>();

            ps.Add(new SqlParameter("DeporteId", deporteId));
            if (fecha != null)
            {
                ps.Add(new SqlParameter("Fecha", fecha.Value.ToShortDateString()));
            }
            ps.Add(new SqlParameter("EventoId", eventoId));
            DataTable dt = db.GetStoreProcedure("conj.pGetCronogramaConjunto", ps);

            foreach (DataRow dr in dt.Rows)
            {
                Cronograma cr = ConvertToCronogramas(dr);
                cr.CronogramaCompetidor = new List <CronogramaCompetidor>();
                CronogramaCompetidor cc = new CronogramaCompetidor();
                cc = HamGeneric.CronogramaCompetidor.GetCronogramaCompetidor(Convert.ToInt32(dr["CompetidorA"]), cr.EventoId);
                cr.CronogramaCompetidor.Add(cc);
                cc = HamGeneric.CronogramaCompetidor.GetCronogramaCompetidor(Convert.ToInt32(dr["CompetidorB"]), cr.EventoId);
                cr.CronogramaCompetidor.Add(cc);
                cr.Instalacion = cr.InstalacionId != 0 ?  Instalacion.GetInstalacion(cr.InstalacionId) : new Instalacion();
                lcr.Add(cr);
            }
            return(lcr);
        }
Example #4
0
        public static DataTable GetSecUsuarios()
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            return(db.GetStoreProcedure("[pSMGetUsuarios]", ps));
        }
Example #5
0
        public static DataTable GetTotales(int grupoId)
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("grupoId", grupoId));
            return(db.GetStoreProcedure("golf.pCalcularNeto", ps));
        }
Example #6
0
        public static DataTable GetHCPporciento(int competidorId)
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("CompetidorId", competidorId));
            return(db.GetStoreProcedure("pGolfGetHCPporciento", ps));
        }
Example #7
0
        public static DataTable GetListaSHCP(int jornadaId, int categoriaId)
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("JornadaId", jornadaId));
            ps.Add(new SqlParameter("CategoriaId", categoriaId));
            return(db.GetStoreProcedure("pgolfTablaClasificatoriasSHCP", ps));
        }
Example #8
0
        public static DataTable GetCredencialDatosPrivilegios(int personaId, int eventoId)
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("PersonaId", personaId));
            ps.Add(new SqlParameter("EventoId", eventoId));
            return(db.GetStoreProcedure("acre.pCredencialDatosPrivilegios", ps));
        }
Example #9
0
        public static DataTable GetResultadoCompetidor(int jornaId, int personaId)
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("JornadaId", jornaId));
            ps.Add(new SqlParameter("PersonaId", personaId));
            return(db.GetStoreProcedure("[golf].[pResultadosCompetidor]", ps));
        }
Example #10
0
        public DataTable EliminarPunto()
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("PuntoId", PuntoId));

            return(db.GetStoreProcedure("[tarc].[pDelPuntos]", ps));
        }
Example #11
0
        public static DataTable GetCompetidoresGrupos(int jornadaId, int categoriaId)
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("JornadaId", jornadaId));
            ps.Add(new SqlParameter("CategoriaId", categoriaId));
            return(db.GetStoreProcedure("[golf].[pListadoGruposPersonas]", ps));
        }
Example #12
0
        public static DataTable GetTypeCrimen()
        {
            DataTable           dt = new DataTable();
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ls = new List <SqlParameter>();

            ls.Add(new SqlParameter("@TypeCrimenId", 1));
            dt = db.GetStoreProcedure("den.GetTypeCrimen", ls);
            return(dt);
        }
Example #13
0
        public static DataTable GetParametroFinalPeriodo(int deporteId)
        {
            DataTable           dt = new DataTable();
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ls = new List <SqlParameter>();

            ls.Add(new SqlParameter("DeporteId", deporteId));
            dt = db.GetStoreProcedure("[conj].[pGetFinalPeriodosId]", ls);
            return(dt);
        }
Example #14
0
        public int savePlanilla()
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("CronogramaId", CronogramaId));
            var resultado = db.GetStoreProcedure("[tarc].[pInsPlanilla]", ps).Rows[0]["Resultado"];

            return(Convert.ToInt32(resultado));
        }
Example #15
0
        public static int deleteCompetidor(int LeccionCompetidorId)
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("LeccionCompetidorId", LeccionCompetidorId));
            var resultado = db.GetStoreProcedure("[ecue].[pDelLeccionCompetidor]", ps).Rows[0]["Resultado"];

            return(Convert.ToInt32(resultado));
        }
Example #16
0
        public static DataTable GetMedalleroGeneral(int eventoId)
        {
            DataTable           dt = new DataTable();
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> lp = new List <SqlParameter>();

            lp.Add(new SqlParameter("EventoId", eventoId));
            dt = db.GetStoreProcedure("prog.pGetMedalleroGeneral", lp);
            return(dt);
        }
Example #17
0
        public static DataTable GetPlanillaAtletismo(int pruebaEventoId)
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> lp = new List <SqlParameter>();

            lp.Add(new SqlParameter("PruebaEventoId", pruebaEventoId));
            DataTable td = db.GetStoreProcedure("indv.pGetPlanillaMiniAtletismo", lp);

            return(td);
        }
Example #18
0
        public static DataTable GetNroJornadas(int eventoId)
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("EventoId", eventoId));
            var respuesta = db.GetStoreProcedure("[golf].[pGetNroJonadasByEvento]", ps);

            return(respuesta);
        }
Example #19
0
        public DataTable cerrarPeriodo()
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("PlanillaId", PlanillaId));
            ps.Add(new SqlParameter("PeriodoId", PeriodoId));

            return(db.GetStoreProcedure("[tarc].[pUpdPeriodos ]", ps));
        }
Example #20
0
        public static DataTable GetResultadoConjuntoVs(int cronogramaId)
        {
            DataTable           dt = new DataTable();
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ls = new List <SqlParameter>();

            ls.Add(new SqlParameter("CronogramaId", cronogramaId));
            dt = db.GetStoreProcedure("[conj].[pGetResultadoConjuntoVs]", ls);
            return(dt);
        }
Example #21
0
        public static DataTable GetCalendarioEvento(int eventoId)
        {
            DataTable           dt = new DataTable();
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ls = new List <SqlParameter>();

            ls.Add(new SqlParameter("EventoId", eventoId));
            dt = db.GetStoreProcedure("[prog].[pGetCalendarioEvento]", ls);
            return(dt);
        }
Example #22
0
        public static DataTable GetResultadosWeb(int cronogramaId, int deporteId)
        {
            DataTable           dt = new DataTable();
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ls = new List <SqlParameter>();

            ls.Add(new SqlParameter("_CronogramaId", cronogramaId));
            ls.Add(new SqlParameter("_DeporteId", deporteId));
            dt = db.GetStoreProcedure("[conj].[pGetResultadoWeb]", ls);
            return(dt);
        }
Example #23
0
        public static DataTable BusquedaCompetidores(string search, int cronogramaId)
        {
            DataTable           dt = new DataTable();
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ls = new List <SqlParameter>();

            ls.Add(new SqlParameter("Search", search));
            ls.Add(new SqlParameter("CronogramaId", cronogramaId));
            dt = db.GetStoreProcedure("[indv].[pSearchCompetidor]", ls);
            return(dt);
        }
Example #24
0
        public static DataTable GetPersonaPrueba(int eventoId, int personaId)
        {
            DataTable           dt = new DataTable();
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ls = new List <SqlParameter>();

            ls.Add(new SqlParameter("EventoId", eventoId));
            ls.Add(new SqlParameter("PersonaId", personaId));
            dt = db.GetStoreProcedure("[acre].[pGetPersonaPruebas]", ls);
            return(dt);
        }
Example #25
0
        public static DataTable GetTarijeta(int competidorJornadaId1, int competidorJornadaId2, int competidorJornadaId3, int competidorJornadaId4)
        {
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("CompetidorJornadaId1", competidorJornadaId1));
            ps.Add(new SqlParameter("CompetidorJornadaId2", competidorJornadaId2));
            ps.Add(new SqlParameter("CompetidorJornadaId3", competidorJornadaId3));
            ps.Add(new SqlParameter("CompetidorJornadaId4", competidorJornadaId4));
            return(db.GetStoreProcedure("[golf].[pGetTarjetaCompetidores]", ps));
        }
Example #26
0
        public static DataTable GetProgramacionInstalaciones(int eventoId, int instalacionId)
        {
            DataTable           dt = new DataTable();
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ls = new List <SqlParameter>();

            ls.Add(new SqlParameter("EventoId", eventoId));
            ls.Add(new SqlParameter("InstalacionId", instalacionId));
            dt = db.GetStoreProcedure("[prog].[pGetProgramacionInstalaciones]", ls);
            return(dt);
        }
Example #27
0
        private bool ExecuteTransaction(string procedureName, List <SqlParameter> ps)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetStoreProcedure(procedureName, ps);

            if (dt.Rows.Count > 0)
            {
                this.CompetidorId = Convert.ToInt32(dt.Rows[0]["Resultado"]);
            }
            return(this.CompetidorId > 0);
        }
Example #28
0
        private bool ExecuteTransaction(string procedureName, List <SqlParameter> ps)
        {
            DBTransaction db = new DBTransaction();
            DataTable     dt = db.GetStoreProcedure(procedureName, ps);

            if (dt.Rows.Count > 0)
            {
                PersonaId = Convert.ToInt32(dt.Rows[0][0]);
            }
            return(PersonaId > 0);
        }
Example #29
0
        public static DataTable GetUltimoCronogramaId(int eventoId, int deporteId)
        {
            DataTable           dt = new DataTable();
            DBTransaction       db = new DBTransaction();
            List <SqlParameter> ls = new List <SqlParameter>();

            ls.Add(new SqlParameter("EventoId", eventoId));
            ls.Add(new SqlParameter("DeporteId", deporteId));
            dt = db.GetStoreProcedure("conj.pGetUltimoCronogramaId", ls);
            return(dt);
        }
Example #30
0
        public static DataTable GetInscripcionEnventoDelegacion(int EventoId, int DelegacionId)
        {
            DBTransaction db = new DBTransaction();
            //DataTable dt = db.GetDataView(string.Format("[acre].[vAcreditacionDetallePersona] where [EventoId]= {0} and DelegacionId = {1}", EventoId, DelegacionId));
            List <SqlParameter> ps = new List <SqlParameter>();

            ps.Add(new SqlParameter("EventoId", EventoId));
            ps.Add(new SqlParameter("DelegacionId", DelegacionId));
            DataTable dt = db.GetStoreProcedure("[acre].[pInscritosDelegacion]", ps);

            return(dt);
        }