Пример #1
0
 /// <summary>
 /// Create a new DetallePartidos object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="idAsociacion">Initial value of the idAsociacion property.</param>
 /// <param name="idPartido">Initial value of the idPartido property.</param>
 /// <param name="puesto">Initial value of the puesto property.</param>
 /// <param name="estado">Initial value of the estado property.</param>
 public static DetallePartidos CreateDetallePartidos(global::System.Int32 id, global::System.Int32 idAsociacion, global::System.Int32 idPartido, global::System.Int32 puesto, global::System.Int32 estado)
 {
     DetallePartidos detallePartidos = new DetallePartidos();
     detallePartidos.id = id;
     detallePartidos.idAsociacion = idAsociacion;
     detallePartidos.idPartido = idPartido;
     detallePartidos.puesto = puesto;
     detallePartidos.estado = estado;
     return detallePartidos;
 }
Пример #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the DetallePartidos EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToDetallePartidos(DetallePartidos detallePartidos)
 {
     base.AddObject("DetallePartidos", detallePartidos);
 }
Пример #3
0
        private void CrearDetallePartidos(Partidos oPartido)
        {
            BaseDatosTorneos bdTorneos = new BaseDatosTorneos();
            int idTorneo = Utilidades.ObtenerValorSession("idTorneo");
            Torneos oTorneo = (from t in bdTorneos.Torneos
                               where t.id == idTorneo
                                   select t).Single();

            for (int indice = 0; indice < oPartido.arbitros; indice++)
            {
                int idCancha = oPartido.idCancha;
                Torneos_Canchas oCancha = (from c in bdTorneos.Torneos_Canchas
                                   where c.idCancha == idCancha && c.idTorneo == idTorneo
                                   select c).Single();

                DetallePartidos oDetalleNuevo = new DetallePartidos();
                oDetalleNuevo.idAsociacion = Utilidades.ObtenerValorSession("idAsociacion");
                oDetalleNuevo.idPartido = oPartido.id;
                oDetalleNuevo.puesto = (int)enumTipoArbitro.Linea;
                oDetalleNuevo.dieta = oTorneo.dieta;
                oDetalleNuevo.viaticos = oCancha.viaticos;
                oDetalleNuevo.total_pagar = oTorneo.dieta + oCancha.viaticos;
                oDetalleNuevo.total_rebajos = 0;
                oDetalleNuevo.estado = (int)enumEstadoDetallePartidos.Pendiente_Pago;

                bdTorneos.AddToDetallePartidos(oDetalleNuevo);
                bdTorneos.SaveChanges();
            }
        }