摘要: string today = ""; string yesterday = ""; string format = "yyyy-MM-dd hh:mm:ss"; today = System.DateTime.Now.ToString(format, DateTimeFormatInfo.InvariantInfo); yesterday = DateTime.Now.AddDays(-1).ToString(format, DateTimeFormatInfo.InvariantInfo); string DayTodaty = t 阅读全文
posted @ 2011-02-18 15:55 高兴happy 阅读(232) 评论(0) 推荐(0) 编辑
摘要: griview导出先设置protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataLoad(); } } private void DataLoad() { object[] obj = { 0 }; DataSet ds = CM.DataAccess.dataDrive.WelanMain.connProcedureExec("CustomerAddress", obj); this.GridView1.DataSource = ds.Tables[0]; this.Gri 阅读全文
posted @ 2011-02-18 15:52 高兴happy 阅读(290) 评论(0) 推荐(0) 编辑
摘要: protected void Button1_Click(object sender, EventArgs e) { string fileName = "WLSearch_Favorites.xls"; string sendMethdo = this.DropDownList1.Text; object[] obj = { sendMethdo }; DataTable dt = CM.DataAccess.dataDrive.WelanMain.connProcedureExec("CustomerAddress", obj).Tables[0]; 阅读全文
posted @ 2011-02-18 15:47 高兴happy 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 前提:设置属性ShowFooter="True"方法一:使用SQL查询统计出合计值,在绑定GridView时让其结果赋于一个DataTable(全局变量),然后在RowDataBound事件中if(e.Row.RowType==DataControlRowType.Footer){e.Row.Cells[0].Text="合计";e.Row.Cells[3].Text=dtSum.Rows[0][0].ToString();e.Row.Cells[4].Text=dtSum.Rows[0][1].ToString();e.Row.Cells[5].Tex 阅读全文
posted @ 2011-02-18 15:42 高兴happy 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 无标题页 using System;using System.Collections;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;us... 阅读全文
posted @ 2011-02-18 15:39 高兴happy 阅读(567) 评论(0) 推荐(0) 编辑
摘要: Tobao_SynProducts.synTaobao.ShiJiWeLan 蔚蓝 = new Tobao_SynProducts.synTaobao.ShiJiWeLan(); Thread th蔚蓝 = new Thread(new ThreadStart(蔚蓝.run)); //创建线程 蔚蓝.run为 运行方法 th蔚蓝.Priority = ThreadPriority.AboveNormal; //为线程设置优先级 th蔚蓝.Start(); //启动线程Tobao_SynProducts.synTaobao.HuangMoGanLin 荒漠甘霖 = new Tobao_SynPr 阅读全文
posted @ 2011-02-18 15:37 高兴happy 阅读(183) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.Text.RegularExpressions;using System.IO;namespace taobao_trades_sold_get{ class Program { public static void Main(string[] args) { //taobao_trades_sold_get.OrderDown down = new OrderDown() 阅读全文
posted @ 2011-02-18 15:26 高兴happy 阅读(457) 评论(0) 推荐(0) 编辑
摘要: 一:文件读取filestream读取:public void reader(){string s = ""; FileStream file = new FileStream(@"d://shop_category[1].txt", FileMode.Open); StreamReader reader = new StreamReader(file,Encoding.Default); while (reader.ReadLine() != null) { s += reader.ReadLine(); }Console.WriteLine(s);}S 阅读全文
posted @ 2011-02-18 15:18 高兴happy 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 读取Xml节点内容public void readXml(){string str = ""; XmlReader re = XmlReader.Create(@"d://s.xml"); while (re.Read()) { if (re.NodeType == XmlNodeType.Text) { str += re.Value+"\r\n"; } } console.writeline(str);}XmlDocument下载节点为“title”的内容public void read(){string str="&q 阅读全文
posted @ 2011-02-18 15:17 高兴happy 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 一:row_number方法分页string Sql="select * from (select row_number() over (order by created) as row_number,* from contents) as T where T.row_number>"+(pagenumber-1)*pagesize+"and T.row_number=@startRowIndex and RowRank < (@startRowIndex+@maximumRows) 阅读全文
posted @ 2011-02-18 15:15 高兴happy 阅读(447) 评论(0) 推荐(0) 编辑