Format:
Recent snippets matching tags of ADO
var conn = new SqlConnection(CONN_STR); var cmd = new SqlCommand("Select * from Employee", conn); conn.Open(); cmd.BeginExecuteReader(ar => { int affected = cmd.EndExecuteNonQuery(ar); cmd.Dispose(); conn.Dispose(); }, null);
37 Views
no comments
<!DOCTYPE html> <html lang="es"> <head> <title>Problema de Física en JS</title> <script type="text/javascript"> //Problema a resolver document.write('<p>Sobre un cuerpo de 36 kg que se encuentra en reposo, se aplica una fuerza durante 7 segundos hasta que alcance una velocidad de 21 m/s. <br /> Calcular: <ol><li>Aceleración</li><li>Espacio</li><li>Fuerza aplicada</li><li>Peso</li></ol></p>'); //Datos iniciales a tener en cuenta var vi = 0; //Velocidad inicial
142 Views
no comments
#region Get entity set name public string GetEntitySetName(Type entityType) { if (entityType == null) throw new ArgumentNullException("entityType"); if (!entityType.IsSubclassOf(typeof(EntityObject))) throw new ArgumentException("Only subclasses of EntityObject are supported.", "entityType"); return GetEntitySetNameInternal(entityType);
619 Views
no comments
Como faço para listar os tipos enumerados de força mais fácil e dinâmica num ComboBox? Essa foi a pergunta de uma grande amigo meu hoje. Confesso que não tinha muita idéia de como fazer. Imagine a situação: type TMeuTipo = (Tipo1, Tipo2, Tipo3, Tipo4, Tipo5); Como fazer isso aparecer em um ComboBox? Bem, podemos transformar isso em Strings e então adicioná-lo ao Combo, mais ou menos assim:
318 Views
no comments
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Configuration; using System.Data.OleDb; using System.Data.SqlClient; using System.Data;
374 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
