09 2012 档案
摘要:string s = "2012-04-23"; DateTime dt; if (DateTime.TryParseExact(s, "yyyy-MM-dd", null, DateTimeStyles.None, out dt)) {//验证通过}需要用到的命名空间:using System.Globalization;原文System.Globalization 命名空间
阅读全文
摘要:实例:select userid,SignId,UserFullName , count(roleid) from dbo.View_SignInfo where userid=27 group by userid,UserFullName,SignId代码解释:列值不同的列是:roleid列值相同的列是:userid,SignId,UserFullName
阅读全文
摘要:1.UserID 并非主键,UserID有重复值SELECT b.*FROM(SELECT*,rid=ROW_NUMBER() OVER(PARTITION BY UserID ORDER BY UserID) FROM EmployeeAllInfo) bWHERE rid =1
阅读全文
摘要:一:if else 语法: if 条件 begin 执行的操作 end else begin 执行的操作 end二:while 语法:while 条件 begin 执行操作 end实例:USE [OABusiness]GO/****** 对象: StoredProcedure [dbo].[inertdate] 脚本日期: 08/31/2012 15:30:23 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOCREATE procedure [dbo].[inertdate]( @date datetime , --插...
阅读全文
摘要:前台Js var sReturn = window.showModalDialog(url, window, temp); if (typeof (sReturn) != "undefined") { document.getElementById("<%=btnsel.ClientID%>").click();//需要执行的操作 }子窗体的后台 ClientScript.RegisterStartupScript(Page.GetType(), "", "window.parent.returnValue=
阅读全文
摘要:时间类型转换成其它格式 string filename = DateTime.Now.ToString("yyyyMMddHHmmss")时间类型转换成HH:mmDateTime dt = new DateTime();dt = DateTime.Parse(data.Tables[0].Rows[j][4].ToString()); tempSheet.Cells[j + 2, 5] = dt.ToString("HH:mm");数值秒转换成HH:mm int seconds = int.Parse(data.Tables[0].Rows[j][5].
阅读全文
摘要:命名空间:Usingusing System;using System.Collections.Generic;using System.Linq;using System.Web;using Microsoft.Office.Tools.Excel;using Microsoft.Office.Interop.Excel;using System.Text;using System.IO;using System.Xml;using System.Globalization;using System.Data;using System.Collections;using System.Col
阅读全文

浙公网安备 33010602011771号