ASP.NET DBHelperÀà
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using System.Data.Common;
using System.Data;
namespace DownData.dal
{
public static class DBHelper
{
private static readonly string connectionString =
"Data Source=.\\newdb;Initial Catalog=downloaddata; uid=sa;pwd=sa";
private static readonly string providerName ="System.Data.SqlClient";
//GetConnection ÓÃÓÚ»ñÈ¡Á¬½ÓÊý¾Ý¿âµÄ connection ¶ÔÏó...
private static DbConnection GetConnection()
{
DbProviderFactory _factory = DbProviderFactories.GetFactory(providerName);
DbConnection connection = _factory.CreateConnection();
connection.ConnectionString = connectionString;
return connection;
}
//GetCommand »ñÈ¡ÃüÁî²ÎÊý command ¶ÔÏó...
private static DbCommand GetCommand(string commandText, CommandType commandType, DbConnection connection)
{
DbCommand command = connection.CreateCommand();
command.CommandText = commandText;
command.CommandType = commandType;
 
Ïà¹ØÎĵµ£º
SP.NETÃæÊÔÌâ
£¨×ª ÔÎĵØÖ·http://blog.sina.com.cn/s/blog_524c848901009e7b.html~type=v5_one&label=rela_nextarticle ×÷Õß
ÀîÑóµÄ²©¿Í
http://blog.sina.com.cn/liiyang£©
1. ¼òÊö private¡¢ protected¡¢ public¡¢ internal ÐÞÊηûµÄ·ÃÎÊȨÏÞ¡£
´ð . private : ˽ÓгÉÔ±, ÔÚÀàµÄÄÚ²¿²Å¿ÉÒÔ·ÃÎÊ¡£
prote ......
ÔÚÒ»¸ö
route
ÖУ¬Í¨¹ýÔÚ´óÀ¨ºÅÖзÅÒ»¸öռλ·ûÀ´¶¨Òå
(
{ and } )
¡£µ±½âÎö
URL
µÄʱºò£¬·ûºÅ
"/"
ºÍ
"."
±»×÷Ϊһ¸ö¶¨Òå·ûÀ´½âÎö£¬¶ø¶¨Òå·ûÖ®¼äµÄÖµÔòÆ¥Å䵽ռλ
·ûÖС£
route
¶¨ÒåÖв»ÔÚ´óÀ¨ºÅÖеÄÐÅÏ¢Ôò×÷Ϊ³£Á¿Öµ¡£
ÏÂÃæÊÇһЩʾÀý
URL
£º
Valid route definitions
Example ......
ʼþÄ£ÐÍ
µ±Ä³¸öÒ³Ãæ±»ÇëÇóʱ£¬ËüµÄÀ༰ÆäËù°üº¬µÄ·þÎñÆ÷¿Ø¼þ»á¸ºÔð´¦ÀíÇëÇ󣬳ÊÏÖHTMLÊä³ö£¬²¢Ëæºó·¢»Ø¿Í»§¶Ë¡£ÓÉÓÚHTTPÐÒéµÄ¹ÌÓÐÌØÐÔ£¬¿Í»§¶ËÓë·þÎñÆ÷¼äµÄͨÐÅÊÇÎÞ״̬ÇÒ·ÇÁ¬½ÓµÄ¡£¶øÊµ¼ÊµÄÓ¦ÓóÌÐòÐèҪ״̬£¬ÒÔ±ãά»¤¶ÔÍ¬Ò»Ò³ÃæµÄºóÐøµ÷Óá£Ê¹ÓÃASP»òÆäËû·þÎñÆ÷¶Ë¿ª·¢Æ½Ì¨(ÈçJava Server PageºÍLAMPÒ»ÀàµÄ»ùÓÚLinuxµÄÏ ......
This server-based method is documented in the Visual Studio help files. Open the Help Index, and enter PrintToPrinter in the "Look for:" box. The syntax for this method is:
Report.PrintToPrinter(<copies as int>, <collated as True/False>, <startpage as int>, <endp ......