摘要:
根据月份算这个月的天数。C# code DateTime d = new DateTime(2008,8,8); System.Globalization.Calendar c = new System.Globalization.GregorianCalendar(); int daysInAugust = c.GetDaysInMonth(d.Year, d.Month); // 31法定节假日that is a bit difficult, you might:C# code DateTime[] m_Holidays = new DateTime[] { new DateTime(20 阅读全文
摘要:
查看你是不是更换了SA密码,进行企业管理器-管理-sql代理-属性-连接里有个sa密码,这里需要改一下密码 阅读全文
摘要:
/************************ *用第二个方法,获取远程文件的大小 *************************///1.判断远程文件是否存在 ///fileUrl:远程文件路径,包括IP地址以及详细的路径private bool RemoteFileExists(string fileUrl) { bool result = false;//下载结果 WebResponse response = null; try { WebRequest req = WebRequest.Create(fileUrl); response = req.GetResponse(); 阅读全文
摘要:
字符串函数对二进制数据、字符串和表达式执行不同的运算。此类函数作用于CHAR、VARCHAR、 BINARY、 和VARBINARY 数据类型以及可以隐式转换为CHAR 或VARCHAR的数据类型。可以在SELECT 语句的SELECT 和WHERE 子句以及表达式中使用字符串函数。常用的字符串函数有:一、字符转换函数1、ASCII()返回字符表达式最左端字符的ASCII 码值。在ASCII()函数中,纯数字的字符串可不用‘’括起来,但含其它字符的字符串必须用‘’括起来使用,否则会出错。2、CHAR()将ASCII 码转换为字符。如果没有输入0 ~ 255 之间的ASCII 码值,CHAR() 阅读全文
摘要:
1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断select*frompeoplewherepeopleIdin(selectpeopleIdfrompeoplegroupbypeopleIdhavingcount(peopleId)>1)例二:select * from testtablewhere numeber in (select number from people group by number having count(number) > 1 )可以查出testtable表中number相同的记录2、删除表中多余的重复记录,重复记录是根据单 阅读全文
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Data.SqlClient;using System.Data;using System.Xml;using System.Xml.Xsl;using System.IO;using System.Data.OleDb;using System.Data.Odbc;using System.Text;us 阅读全文
摘要:
protected void Page_Load(object sender, EventArgs e) { string paths = Server.MapPath(""); DataSet ds3= getcsv(paths, paths+"2010年淘趣后台导入价格表样式20100828.csv"); GridView1.DataSource = ds3; GridView1.DataBind(); } private DataSet getcsv(string filepath, string file... 阅读全文
摘要:
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;public partial class Page : System.Web.UI.Page{p 阅读全文
摘要:
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;public partial class Page : System.Web.UI.Page{p 阅读全文
摘要:
1. 打开新的窗口并传送参数: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="++"')</script>")2.为按钮添加对话框CodeCode hig 阅读全文