08 2011 档案
摘要:--表:T_UsersInfo(用户详情表)if exists(select name from sys.objects where name='T_UserInfo')drop table T_UserInfogocreate table T_UserInfo( C_UserID int identity(1,1), C_UserName nvarchar(20), C_RealName nvarchar(20), C_Age int, C_Sex bit, C_Mobile char(11), C_Phone char(11), C_Email nvarchar(50),
阅读全文
摘要:using System;using System.Data;using System.Data.SqlClient;using System.Configuration;/// <summary>/// 针对 SQL Server 数据库操作的通用类/// 作者:周金桥/// </summary>public class SqlDbHelper{ /// <summary> /// 设置数据库链接字符串 /// </summary> public string connectionString=ConfigurationManager.Conn
阅读全文
摘要:use mastergoif exists(select name from sys.databases where name='Data')drop database Datagocreate database Datagouse Datagoif exists(select name from sys.objects where name='studentOne')drop table studentOnegocreate table studentOne( studentName nvarchar( 10 ), studentSubject nvarcha
阅读全文
摘要:--数据的批量插入if exists(select name from sys.databases where name='DB_Test')drop database DB_Testgocreate database DB_Testgouse DB_Testgoif exists(select name from sys.objects where name='T_Table1')drop table T_Table1gocreate table T_Table1( a nvarchar(10),--姓 b nvarchar(10),--性别 c int,--
阅读全文
摘要:继承在应用程序开发过程中,需要完成功能相近但是实现不同的类来抽象对象的时候,就需要用到继承。继承优点 提高重用性:派生提高了代码的重用性,不至于在创建一个新对象时再重新写一个新的类。提高结构性:派生让程序有了结构,在程序开发过程,每一个派生类均继承上一个类的方法,且每个派生类除了可以使用公共的字段以外,可以专门为派生类增加字段和方法而不去影响到其他的派生类public class Animal //创建基类{public string type; //创建基类成员public string color; //创建基类成员public string sound; //创建基类成员}public
阅读全文

浙公网安备 33010602011771号