摘要: 注:setInterval和setTimeout的区别setInterval是按照设置的时间无限次数的刷新setTimeout是按照设置的时间值刷新一次所以例二setTimeout实现了递归回调 无标题页 ====================================================================或者 无标题页 阅读全文
posted @ 2011-02-18 17:12 高兴happy 阅读(11077) 评论(0) 推荐(0) 编辑
摘要: 先新建一个winform项目,在拖入listView1控件using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.ServiceProcess;namespace 获取服务信息{ public partial class Form1 : Form { public Form1( 阅读全文
posted @ 2011-02-18 16:37 高兴happy 阅读(277) 评论(0) 推荐(0) 编辑
摘要: 先添加名为ConfigUtil 的类文件using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Configuration;using System.Xml;namespace MakeSiteMap.Utils{ /// /// 对配置文件[App.config]进行操作 /// public class ConfigUtil { #region Methods /// /// 通过 key 读取配置文件的值 /// /// /// public ... 阅读全文
posted @ 2011-02-18 16:24 高兴happy 阅读(424) 评论(0) 推荐(0) 编辑
摘要: declare id_cursor CURSOR FOR SELECT id FROM #t1 ----创建游标Open id_cursor ---打开游标declare @id int,@S varchar(100), @S1 varchar(100),@S2 varchar(100),@S3 varchar(100),@publisher nvarchar(255),@addre nvarchar(255),@postcode float,@phone nvarchar(255)fetch next from id_cursor into @id ---游标第一次移动并复制给参数selec 阅读全文
posted @ 2011-02-18 16:16 高兴happy 阅读(293) 评论(0) 推荐(0) 编辑
摘要: using System;namespace KuCun{ class Program { static void Main(string[] args) { string str = "{0} {1} {2}"; BuildImage buildImage = ImageProvider.Provider; for (int i = 0; i /// 图片提供程序 /// public static class ImageProvider { private static BuildImage buildImage = null; /// /// 生成图片 /// pub 阅读全文
posted @ 2011-02-18 16:13 高兴happy 阅读(2024) 评论(0) 推荐(0) 编辑
摘要: public static void Main(string[] args) { DirectoryInfo dir = new DirectoryInfo(@"E:\书摘与插图\9"); Addpicture.showDir(dir); } namespace TaoBaoAddPicture{ public class Addpicture { private static string FullName; private static int name; public static void showDir(DirectoryInfo dir) { Console.W 阅读全文
posted @ 2011-02-18 16:11 高兴happy 阅读(542) 评论(0) 推荐(0) 编辑
摘要: 在Repeater1中点击点击查看详情按钮 在Reperter2中显示信息protected void _details(object sender,EventArgs e) { this.Panel2.Visible=true; HtmlAnchor a = (HtmlAnchor)sender;//取出reperter1中的a标签中的内容 int productid=Convert.ToInt32(a.Title.ToString());//取出a标签中title上绑定的值//绑定 string sql = string.Format("select Description fr 阅读全文
posted @ 2011-02-18 16:01 高兴happy 阅读(1124) 评论(0) 推荐(1) 编辑
摘要: protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='yellow',this.style.fontWeight='bold'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=&# 阅读全文
posted @ 2011-02-18 16:01 高兴happy 阅读(1301) 评论(0) 推荐(1) 编辑
摘要: OpenFileDialog obj = new OpenFileDialog(); if (obj.ShowDialog() == DialogResult.OK) { this.txtpath.Text = obj.FileName; }弹出打开窗口,将地址保存this.txtpath.TextOpenFileDialog obj = new OpenFileDialog(); if (obj.ShowDialog() == DialogResult.OK) { this.txtpath.Text = obj.FileName; } 阅读全文
posted @ 2011-02-18 16:00 高兴happy 阅读(193) 评论(0) 推荐(0) 编辑
摘要: GridView没有自动加行号的功能,记录需要行号的话,可以在模板列中使用repeater数据库查询序号: RowNumber:select rownumber() over (order by bookid) as rownumber ,* from booksource这句话主要用到了rownumber!而rownumber的主要语法(即结构)是:rownumber() over(order by @) 以@排序为表添加一个自曾的列! 所以上面的spl语句的意思是:为表booksource创建一个名为rownumber的自曾列! 阅读全文
posted @ 2011-02-18 15:59 高兴happy 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 注:将ShowFooter属性设置为true int mysum1 = 0; Double mysum2 = 0; protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { DataRowView myrows = (DataRowView)e.Row.DataItem; //要统计总数的列 mysum1 += Convert.ToInt32(myrows[8].ToString()); my. 阅读全文
posted @ 2011-02-18 15:56 高兴happy 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑