摘要: 先新建一个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) 编辑
摘要: 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) 编辑
摘要: 在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) 编辑
摘要: 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) 编辑