Example #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();

                }
            }
        }
Example #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();
     }
 }
Example #3
0
		private void detach_toptens(topten entity)
		{
			this.SendPropertyChanging();
			entity.usuario = null;
		}
Example #4
0
		private void attach_toptens(topten entity)
		{
			this.SendPropertyChanging();
			entity.usuario = this;
		}
Example #5
0
 partial void Deletetopten(topten instance);
Example #6
0
 partial void Updatetopten(topten instance);
Example #7
0
 partial void Inserttopten(topten instance);