摘要: 继承在应用程序开发过程中,需要完成功能相近但是实现不同的类来抽象对象的时候,就需要用到继承。继承优点 提高重用性:派生提高了代码的重用性,不至于在创建一个新对象时再重新写一个新的类。提高结构性:派生让程序有了结构,在程序开发过程,每一个派生类均继承上一个类的方法,且每个派生类除了可以使用公共的字段以外,可以专门为派生类增加字段和方法而不去影响到其他的派生类public class Animal //创建基类{public string type; //创建基类成员public string color; //创建基类成员public string sound; //创建基类成员}public 阅读全文
posted @ 2011-09-30 11:30 Curitis 阅读(220) 评论(0) 推荐(0) 编辑
摘要: <style type="text/css">* {margin:0;padding:0;}body {font-family:"Arial Black", Gadget, sans-serif;font-size:12px;}.clear {clear:both;}.top {height:170px;}#main {width:300px;height:300px;position: relative;margin:0 auto;border:1px solid red;}.top_left {width:70px;height:70px 阅读全文
posted @ 2011-09-16 08:58 Curitis 阅读(139) 评论(0) 推荐(0) 编辑
摘要: @charset "utf-8";/* 初始化模板www.divcss5.com */body, div, address, blockquote, iframe, ul, ol, dl, dt, dd, li, dl, h1, h2, h3, h4, pre, table, caption, th, td, form, legend, fieldset, input, button, select, textarea {margin:0;padding:0;font-style: normal;font:12px/22px Arial, Helvetica, sans-s 阅读全文
posted @ 2011-09-15 06:14 Curitis 阅读(277) 评论(0) 推荐(0) 编辑
摘要: /* Install GlobalToyz database */USE masterif exists (select * from sysdatabases where name='WanJu')begin DROP database WanJuendGO CREATE DATABASE WanJuGOUSE WanJugo/* creating required data types */execute sp_addtype id ,'char(6)' ,'NOT NULL'Gocreate table 类别(类别号char(3),类别名c 阅读全文
posted @ 2011-09-09 01:05 Curitis 阅读(866) 评论(0) 推荐(0) 编辑
摘要: <style type="text/css">body { font-family:Arail 新宋体; font-size:15px; margin:0; padding:0;}.menu { width: 150px; margin: 50px 0 0 20px;}.menu ul { padding: 0; margin: 0; list-style-type: none;}.menu ul li { float: left; position: relative;}.menu ul li a, .menu ul li a:visited { displa 阅读全文
posted @ 2011-09-06 12:30 Curitis 阅读(183) 评论(0) 推荐(0) 编辑
摘要: --表: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), 阅读全文
posted @ 2011-08-30 13:33 Curitis 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2011-08-30 13:19 Curitis 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2011-08-17 00:46 Curitis 阅读(215) 评论(0) 推荐(0) 编辑
摘要: --数据的批量插入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,-- 阅读全文
posted @ 2011-08-17 00:21 Curitis 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 继承在应用程序开发过程中,需要完成功能相近但是实现不同的类来抽象对象的时候,就需要用到继承。继承优点 提高重用性:派生提高了代码的重用性,不至于在创建一个新对象时再重新写一个新的类。提高结构性:派生让程序有了结构,在程序开发过程,每一个派生类均继承上一个类的方法,且每个派生类除了可以使用公共的字段以外,可以专门为派生类增加字段和方法而不去影响到其他的派生类public class Animal //创建基类{public string type; //创建基类成员public string color; //创建基类成员public string sound; //创建基类成员}public 阅读全文
posted @ 2011-08-16 23:38 Curitis 阅读(241) 评论(0) 推荐(0) 编辑