摘要: public static class WebManager { /// summary /// 根据控件ID获取控件对象 /// /summary /// param name="web"web对象/param /// param name="id"控件ID/param /// returns对应ID的控件对象/returns private static HtmlElement GetHtmlElementByID(WebBrowser web, string id) { return web.Document.GetElementById(id); } / 阅读全文
posted @ 2010-12-20 10:59 紫荆飞翔 阅读(786) 评论(0) 推荐(0) 编辑
摘要: //注:要进行分页的实体类对象都要实现IPage接口方可使用public interface IPage { string[] Export(); } public class PaginManager { /// summary /// 构造函数 /// /summary /// param name="dataGridView"绑定的datagrodview控件/param /// param name="list"全部的集合/param /// param name="isShowNum"是否要显示序列号/param /// param name="is 阅读全文
posted @ 2010-12-20 10:35 紫荆飞翔 阅读(458) 评论(2) 推荐(0) 编辑
摘要: 类1:定义一个发送的模板类型,其中有表单Id,文本框的值,对应的类型public class SendTemp { public SendTemp() { } public SendTemp(SendTemp temp) { this.FormId = temp.FormId; this.SendTypeId = temp.SendTypeId; this.TextValue = temp.TextValue; } public string TextValue { set; get; } public int FormId { get; set; } public int SendTypeI 阅读全文
posted @ 2010-12-20 10:26 紫荆飞翔 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1:文本的初始化 private void Init() { textBoxX1.Text = "域名";//给文本赋值 textBoxX1.Tag = "域名";//文本的tag值 textBoxX1.ForeColor = Color.Silver;//设置文本框字体的颜色 textBoxX1.TextAlign = HorizontalAlignment.Center;//设置文本框文本居中 textBoxX2.Tag = "姓名"; textBoxX2.Text = "姓名"; textBoxX2.ForeColor = Color.Silver; textBoxX2.TextAlig 阅读全文
posted @ 2010-12-20 09:37 紫荆飞翔 阅读(477) 评论(0) 推荐(0) 编辑
摘要: eg1:private void buttonX1_Click(object sender, EventArgs e) { string test = "afsfsdf,sdfsfdsf,sdfdsfsdf,AFSFASF,adfsf,afdsf,,,,,"; string firstUpper = toUpper(test); string uppers = firstUpper.Replace(",",""); Console.WriteLine(test);//原始数据 Console.WriteLine(uppers);//将首字母转换成大写,去除逗号 Console.WriteLin 阅读全文
posted @ 2010-12-20 09:32 紫荆飞翔 阅读(320) 评论(0) 推荐(0) 编辑