Exemplo n.º 1
0
        /* ---------------------------------------------------------------------*/
        public void eliminartabla()
        {
            if (db.toptens.Count() > 0)
            {
                IEnumerable<topten> lista =

                (from aux in db.toptens
                 select new topten
                 {
                     id                 = aux.id,
                     idusuario          = aux.idusuario,
                     puntosportorneo    = aux.puntosportorneo,
                 }
                );
                foreach (var aux in lista)
                {
                    MvcApplication6.Models.topten M = new topten
                    {
                        id = aux.id,
                        idusuario = aux.idusuario,
                        puntosportorneo = aux.puntosportorneo,
                    };
                    db.toptens.Attach(M);
                    db.toptens.DeleteOnSubmit(M);
                    db.SubmitChanges();

                }
            }
        }
Exemplo n.º 2
0
 /* ---------------------------------------------------------------------*/
 /* ---------------------------------------------------------------------*/
 public void insertarpuntos( IEnumerable<boletamodels> lboletas )
 {
     foreach (var auxb in lboletas)
     {
         topten P = new topten();
         P.idusuario = auxb.idusuario;
         P.puntosportorneo = auxb.puntostotales;
         db.toptens.InsertOnSubmit(P);
         db.SubmitChanges();
     }
 }
Exemplo n.º 3
0
		private void detach_toptens(topten entity)
		{
			this.SendPropertyChanging();
			entity.usuario = null;
		}
Exemplo n.º 4
0
		private void attach_toptens(topten entity)
		{
			this.SendPropertyChanging();
			entity.usuario = this;
		}
Exemplo n.º 5
0
 partial void Deletetopten(topten instance);
Exemplo n.º 6
0
 partial void Updatetopten(topten instance);
Exemplo n.º 7
0
 partial void Inserttopten(topten instance);