
自已的东西
文章平均质量分 67
godpreserve
xyz
展开
-
自动为表生成序列号
底层SQL语句SELECT MAX(SUBSTRING(LineStopID, 9, 2)) AS LineStopMAXIDFROM L_StopInfoDetailWHERE (CONVERT(NVARCHAR(10), SUBSTRING(LineStopID, 3, 6), 112) = SUBSTRING(CONVERT(NVARCHAR(10), GETDATE(),原创 2008-04-30 09:48:00 · 796 阅读 · 0 评论 -
附件上传,下载,查看,删除
namespace ROHSUI.ReportCenter{ //2009-7-21 上午 张锐 创建 public partial class Attachment : System.Web.UI.Page { string ReportNO; string ReportID; string HistoryP原创 2009-08-07 13:15:00 · 1458 阅读 · 0 评论 -
应用程序引用的程序集文件基目录更改后,添加配置文件使应用程序可用
如:以前的APPDIR目录中:UpdateRoHSDB.exe,Microsoft.Data.ConnectionUI.Dialog.dll,Microsoft.Data.ConnectionUI.dll其中后面两个DLL程序集是UpdateRoHSDB.exe程序中必须引用的。当时是把它们同时放在APPDIR目录中,程序运行正常。但后来把这两个DLL程序集放入APPDIR目录的子文件夹a原创 2009-08-10 15:12:00 · 687 阅读 · 0 评论 -
用PROFILE来存储用户信息。
1.运行C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/aspnet_regsql.exe来引导一个注册界面,用来在现有数据库中新建提供程序所需用到的表或在已有数据库中加入这些表2.在你的网站程序的WEB.CONFIG中添加和节。原创 2009-07-01 11:21:00 · 798 阅读 · 0 评论 -
保障Web服务安全性
给访问WEB SERVICE加上一层安全性。1.新建一个WEB SERVICE项目。2.在项目中新建一个类MySoapHeader.cs public class MySoapHeader : SoapHeader { private string username; private string password;原创 2009-07-01 17:17:00 · 580 阅读 · 0 评论 -
webBrowser使用
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Runtime.Intero原创 2009-07-14 09:31:00 · 710 阅读 · 0 评论 -
lambda表达式
#region //一个SQL TO LINQ 的CONTEXT对像 MYDCSDataContext myContext = new MYDCSDataContext(); //正常的LINQ语法,找出部门ID为1的部门信息 var dept = (from d in myContex原创 2009-09-17 16:59:00 · 1242 阅读 · 0 评论 -
客户端脚本创建界面元素
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml" > Untitled Page function addElement() { var elementTag = document.createElement("textArea")原创 2009-09-21 09:30:00 · 602 阅读 · 0 评论 -
合并 GridView 的表头单元格
合并 GridView 的表头单元格原创 2010-08-25 09:18:00 · 570 阅读 · 0 评论 -
ORACLE数据库移植
ORACLE数据库移植原创 2011-02-10 09:43:00 · 645 阅读 · 0 评论 -
asp.net 网站防攻击 安全
asp.net 网站防攻击 安全原创 2011-04-01 16:27:00 · 1167 阅读 · 0 评论 -
ORACLE 新增时自增列---触发器实现
create or replace trigger TRIG_TBL_SYS_USER before insert on TBL_SYS_USER for each rowbegin select SEQ_TBL_SYS_USER.nextva原创 2011-08-19 13:34:44 · 591 阅读 · 0 评论 -
数据访问层小示例
一,CommonDataAccessusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Data;using System.Collections;namespace CommonDataAccessLayer{ pub原创 2009-07-14 09:40:00 · 594 阅读 · 0 评论 -
C#列出局域网中可用SQL Server服务器
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data.Sql;using System.Data.SqlClient;public partial c原创 2008-12-04 16:21:00 · 801 阅读 · 0 评论 -
在网页上双击滚动页面,单击停止
var currentpos,timer;function initialize(){ timer=setInterval("scrollwindow()",50);}function sc(){ clearInterval(timer);}function scrollwindow(){ currentpos=document.b原创 2008-06-26 14:47:00 · 805 阅读 · 0 评论 -
C#中比较两个时间的时间差
C#中比较两个时间的时间差 DateTime lastLoginTime = user.LastLoginDate;//最后一次的登录时间 DateTime nowTime = DateTime.Now;//现在在时间 TimeSpan ts = nowTime.Subtract转载 2008-04-29 09:10:00 · 2351 阅读 · 0 评论 -
定时器
public class Setting { private Timer time; private double _outinterval = 1.0;//用户输入的定时器间隔 private string _type = "h";//用户输入的定时器间隔类型,h为小时,m分,s秒 public double outinterva原创 2008-04-25 18:12:00 · 530 阅读 · 0 评论 -
鼠标经过行时改变gridview行的样式的功能
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.Pager) { return; } e.Row.Cells[0].Att原创 2008-05-06 09:58:00 · 933 阅读 · 0 评论 -
MD5加密
static public class MD5 { /// /// 返回MD5加密结果 /// /// 需要加密的字符串 public static string GetMD5(string str) { if (str == null) {原创 2008-05-05 16:54:00 · 484 阅读 · 0 评论 -
点击Gridview行,选中/取消选中,当前行中的Checkbox
客户端方法:function check(opt){ var chk = window.document.getElementById(opt); if(chk.checked == true) { chk.checked = false; } else { chk.checked = true; }}服务器端方法:原创 2008-05-06 15:55:00 · 3756 阅读 · 0 评论 -
换页时,Gridview当前页选中的CheckBox选中状态不会丢失
客户端代码:function check(opt,id){ var chk = window.document.getElementById(opt); if(chk.checked == true) { chk.checked = false; } else { chk.checked = true; } v原创 2008-05-06 16:34:00 · 1896 阅读 · 0 评论 -
同时上载多个文件
Javascript代码: function addFile() { var filebutton = ; document.getElementById(FileList).insertAdjacentHTML("beforeEnd",filebutton); } 页面中: 邮件附件列原创 2008-07-21 14:42:00 · 491 阅读 · 0 评论 -
动态生成带格式页面
int[] count = null;//存放每一组考核标题中对应的考核项数量.它的Length就是标题数量 protected void Page_Load(object sender, EventArgs e) { DataSet2TableAdapters.ScaleTitleTableAdapter st = new DataSet2TableAdapters原创 2008-08-04 16:13:00 · 665 阅读 · 0 评论 -
对于文本流,文件流,网络流和网络上通讯的操作
//文件流 FileStream fs = new FileStream("", FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.ReadWrite); byte[] b = new byte[1024]; int i = fs.Read(b, 0, b.Length)原创 2008-05-18 10:26:00 · 1101 阅读 · 0 评论 -
调用系统API
using System.Runtime.InteropServices;public class useAPI{ public useAPI() { // // TODO: 在此处添加构造函数逻辑 // } /// /// 打开和关闭CD托盘. /// [DllImport("winmm.dll", En原创 2008-05-31 14:26:00 · 535 阅读 · 0 评论 -
右下脚弹出的提示框用来提醒用户消息
提示框页面: 提醒 这是一个右下脚弹出的提示框 用来提醒用户用的 window.resizeTo(220,210); var windowW=220 // wide var windowH=210 // high var Yoffset=0 // in pi原创 2008-06-19 13:46:00 · 1079 阅读 · 0 评论 -
String拼接html字符串时拼单引号、双引号
当拼接JS字符串的时候,双引号里面一定要是单引号,单引号里面要是双引号,如此循环!不过全部双引号也可以,就是双引号里面的双引号需要转义!转载 2018-11-06 16:06:00 · 1607 阅读 · 0 评论