10 2012 档案
摘要:1:连接数据库(在表示层中添加应用配置文件,写上以下代码)App.config<?xml version="1.0" encoding="utf-8" ?><configuration> <connectionStrings> <add name="constr" connectionString="server=.;uid=sa;pwd= ;database=DB" providerName="System.Data.SqlClient"/> &
阅读全文
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 using System.Text; 8 using System.Windows.Forms; 9 using System.Runtime.InteropServices; 10 11 namespace WindowsFormsApplication2 12 { 13 ...
阅读全文
摘要:根据输入的password而生成salt和pwdHash /// <summary> /// 根据pwd分别生成Salt和Pwd的值(新增插入时使用) /// </summary> /// <param name="pwd">明文的密码</param> /// <param name="salt">密文后的salt</param> /// <param name="pwdhash">密文后的pwd</param> public static
阅读全文
摘要:@pageSize 表示每页显示的行数@pageIndex 表示第几页显示1: 单独的一个分页查询基本格式为:select top @pageSize * from Table where Id not in (select top @pageSize*(@pageIndex-1) Id from Table order by Id ) order by Id2: 带where条件的分页查询的存储过程的建立create proc proc_Page@pageSize int=10, -- 默认每页显示十条信息@pageIndex int=1, -- 默认显示第一页@where varcha..
阅读全文
摘要:1: 三角形状: for (int i = 0; i < 10; i++) { for (int j = 0; j < 10 - i; j++) { Console.Write(" "); } for (int k = 0; k < i; k++) { Console.Write("* "); } ...
阅读全文

浙公网安备 33010602011771号