02 2014 档案
对数据的增删查改深度理解三(多)层编程理念
摘要:比较容易遗忘的代码:UI层: private void btnSelect_Click(object sender, EventArgs e) { if (txtIDCar.Text.Trim().Length == 18) { DeliverData deliver = new DeliverData(); TblPerson person = null; if ((person = deliver.Select(txtIDCar....
阅读全文
组合类中复制函数的调用
摘要:// 组合类中复制函数的调用.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std;class Point{public: Point(int xx=0,int yy=0)//内联的构造函数 { x=xx,y=yy; } Point(Point &p);//复制构造函数 int getX(){return x; }//内联函数 int getY() { return y; } //~Point();privat...
阅读全文
用用户登录简单理解三层思想
摘要:项目文件列表:GetUserLoginState.sc public class GetUserLoginState { /// /// 检测用户登录状态 /// public GetUserLoginState() { } //推荐在此定义类型变量,而不是在方法中new一个新的对象 private TLoginModel model; public UserLoginStateEnum LoginState(string userName, strin...
阅读全文
用简单的修改数据理解三层概念
摘要:项目文件列表:文件中值得注意的代码:DataManager.cs: public List GetDataList() { List models; SqlHelper sqlhelper = new SqlHelper(); string sql = "select * from MyOrders"; using (SqlDataReader reader = sqlhelper.ExecuteReader(sql, null)) { ...
阅读全文
单表数据加载到TreeView(.Node.Level>=2) "蝴蝶效应" SelectedNode注意事项 效能优化 综合问题
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms;namespace 将单表数据加载到TreeView{ public pa...
阅读全文
NPOI 操作数据库中数据的导入导出(Excel.xls文件) 和null数据的处理。
摘要:App.config: *.scusing NPOI.HSSF.UserModel;using NPOI.SS.UserModel;//using NPOI.HSSF.UserModel;using System;using System.Collections.Generic;using System.ComponentModel;using System.Configuration;using System.Data;using System.Data.SqlClient;using System.Drawing;using System.I...
阅读全文
网页中评分效果原理。
摘要:哈哈,只是简单的原理(代码可能不是这样写的),明白原理就好~~~~~ ☆ ☆ ☆ ☆ ☆ 百度浏览器效果图:JQuery代码: ☆☆☆☆☆☆ jquery-1.7.1.js文件官网:http://jquery.com/download/
阅读全文