public int Eliminar(PuntuacionesBO obj) { SqlCommand Cmd = new SqlCommand("delete Puntuaciones where IdPuntuacion = @Cod"); Cmd.Parameters.Add("@Cod", SqlDbType.Int).Value = obj.Codigo; return(Conexion.EjecutarComando(Cmd)); }
public int Agregar(PuntuacionesBO obj) { SqlCommand Cmd = new SqlCommand("insert into Puntuaciones (IdUsuario5,Puntuacion) values(@CodUsu,@Puntuacion)"); Cmd.Parameters.Add("@CodUsu", SqlDbType.Int).Value = obj.CodigoUsuario; Cmd.Parameters.Add("@Puntuacion", SqlDbType.Int).Value = obj.Puntuacion; return(Conexion.EjecutarComando(Cmd)); }
public int Modificar(PuntuacionesBO obj) { SqlCommand Cmd = new SqlCommand("update Puntuaciones set IdUsuario5 = @CodUsu,Puntuacion = @Puntuacion where IdPuntuacion = @Cod"); Cmd.Parameters.Add("@Cod", SqlDbType.Int).Value = obj.Codigo; Cmd.Parameters.Add("@CodUsu", SqlDbType.Int).Value = obj.CodigoUsuario; Cmd.Parameters.Add("@Puntuacion", SqlDbType.Int).Value = obj.Puntuacion; return(Conexion.EjecutarComando(Cmd)); }