自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 资源 (11)
  • 收藏
  • 关注

原创 控件数组赋值

有一组label控件在groupBox1容器中C# foreach (Control lb in this.groupBox1.Controls)            {                if (lb is Label)                {                    ((Label)lb).Text = "abc";     

2014-07-06 11:02:58 716 1

原创 DataTable dt = (DataTable)dataGridView1.DataSource,dt返回空值的问题

有时我们需要将DataGrid.DataSource转换成DataTable的问题

2014-06-17 10:11:25 7738

转载 c# DataGridView添加合计行的例子

private void Form1_Load(object sender, EventArgs e) { dataGridView1.DataSource = GetData(); } private void button1_Click(object sender, EventArgs e)  {

2014-06-14 19:43:54 5289

原创 用修改DataGridView数据并更新数据库

OleDbDataAdapter dtAdapter; private void button15_Click(object sender, EventArgs e) { string con = "Provider=Microsoft.Jet.OleDb.4.0;Data Source=STUDENT.MDB"; s

2014-04-26 19:44:10 7068 4

原创 c# dataset保存多属性的XML

DataSet ds = new DataSet("encryption"); DataColumn Cw = new DataColumn("InfoID", typeof(string)); DataColumn Cwnum = new DataColumn("Password", typeof(string));

2014-02-13 15:02:14 2650

原创 c# 计算2个时间的时间差

private TimeSpan GetTimePeriod(DateTime dt1, DateTime dt2)    {        return dt2.Subtract(dt1);    }  DateTime DateTime1, DateTime2;        DateTime1 = Convert.ToDateTime("2014-01-23 2

2014-01-24 10:17:39 3094

原创 c# 取得指定目录下的所有子目录名(不含路径)

// 取得指定目录下的所有子目录名(不含路径)  string s = @"D:\data\file"; string[] dirs = Directory.GetDirectories(s); List list=new List(); foreach (string item in dirs) {

2014-01-17 08:47:52 5019

原创 c# 将dataset中的数据导入到sql数据库中

SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=data;User ID=sa;password=sa;Integrated Security=False"); //参数化sql语句 public void InSertData(string s1,string s2, str

2014-01-14 20:21:10 2661 1

原创 c# 用dataset读取xml也很方便

0 Success Role1false Role2true DataSet dt = new DataSet(); dt.ReadXml("tt.xml"); string

2014-01-14 09:52:21 4191

原创 vb.net datagridview中保存到xml

’写:    Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click Dim ds As New DataSet ds = DataGridView1.DataSource ds.WriteXml("test

2014-01-14 08:54:05 1335

原创 c# 读取带有命名空间的XML

1.xml的内容 XmlDocument xml = new XmlDocument();

2014-01-01 19:12:28 2643

原创 c# 读取本地数据库数据,写到远程数据库中

public void insertdata(string s1, string s2, string s3)//插入数据库 { SqlConnection con = new SqlConnection("Data Source=10.168.1.5;Initial Catalog=data;User ID=sa;password=sa;Integrate

2013-12-31 11:23:06 2433 2

原创 c# 主窗体传值给子窗体

在Form1中 public static Form1 f=null; public Form1() { InitializeComponent(); f = this; } public string IP() {

2013-12-29 20:19:22 1947 1

原创 c# 在类中将数据传递给窗体

在Form1中 textbox1的modifilers设为Public, public static Form1 f=null; public Form1() { InitializeComponent(); f = this; } private void button1_Clic

2013-12-27 12:26:19 3868

原创 c# 2个窗体之间传递的简单方法

现在有两个窗口form1和form2,现在form2中有个listbox。双击listbox的值以后,将选中的值传给form1中的textbox控件form1中的textbox1的modifilers设为Public, private void button1_Click(object sender, EventArgs e) {  Form2 f2

2013-12-27 11:23:09 1123 1

转载 数据入库代码

SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=table;Integrated Security=True"); con.Open(); SqlCommand cmd = new SqlCommand(string.Format("select Count(*

2013-12-26 22:50:25 977 1

转载 c# 解析json(整理)

using Newtonsoft.Json.Linq; string data="{'a':'aaa','b':'bbb','c':'ccc'}"; JObject jo = JObject.Parse(data); string[] values = jo.Propertie

2013-12-07 12:29:25 636 1

转载 文本文件的数据显示在 DataGridView1上(整理)

'新建一个datatable用于保存读入的数据 Dim list As New DataTable() '给datatable添加三个列 list.Columns.Add(New DataColumn("aa", System.Type.GetType("System.String"))) list.Columns.Add(New D

2013-12-05 16:06:42 3540 1

DevExpress Universal 13.1.5 注册补丁

DevExpress Universal 13.1.5 注册补丁

2013-10-15

简单的WPF时钟源码

简单的WPF时钟源码,时钟控件,用网上提供的方法(http://blog.csdn.net/johnsuna/article/details/1845605)整理而成。

2013-09-27

模拟雷达扫描

简单的WPF的模拟雷达扫描源码,可了解WPF动画的方法

2013-09-27

LED时钟控件及例子

C# LED数字时钟控件及其应用源码,可加上背景

2013-04-23

ArcGIS API for Silverlight 3.0

ArcGIS API for Silverlight 3.0

2013-02-22

ILSpy_Master

反编译WPF利器,学习WPF捷径,很好用!类似reflector。

2013-02-21

Telerik RadControls for Silverlight 2010.2 714 控件

最近开发需要,下了不少Telerik RadControls for Silverlight新版本,都说无需破解,但在vs2010里都出错,无法用,只有这个版本使用正常,共享一下。

2013-02-21

DotNetBar 的测量仪器控件应用源码

DotNetBar版本为10.80,测量仪器控件 温度计的应用源码及DotNetBar 10.80补丁。

2012-08-16

DevComponents DotNetBar 和DotNetBar2

很酷的控件,office 2007的控件。 DevComponents.DotNetBar2 7.0 DevComponents.DotNetBar 4.7

2012-08-14

flash地图开发api

提供 flash地图开发api,有arcgis bing erathplayerlib google map,mapabc;modestmap;

2011-09-29

.NET Reflector 7.0.0.420

一个类浏览器和反编译器,利用反射机制来分析程序集,以展示程序集中各种类型及其成员的信息,

2011-09-29

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除