会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
chenaran
博客园
首页
新随笔
联系
订阅
管理
2023年3月15日
保存数据为CSV文件
摘要: 在一些项目中,有一些动态数据保存的需求,保存为CSV。 解决方法如下: 引用: using System;using System.Data;using System.Collections;using System.Collections.Generic;using System.Linq;usi
阅读全文
posted @ 2023-03-15 09:41 chenaran
阅读(85)
评论(0)
推荐(0)
2015年3月31日
Quartz 之 windowService
摘要: (一)创建服务QuarzServiceusing System.ServiceProcess;using System.Text;using Quartz;using Quartz.Impl;using WinNet.Log;namespace QuarzService{ public par...
阅读全文
posted @ 2015-03-31 11:44 chenaran
阅读(455)
评论(0)
推荐(0)
2013年4月22日
DevExpress XtraGrid 编辑数据时不能自动保存到网络
摘要: using DevExpress.XtraEditors;using DevExpress.XtraEditors.Controls;using DevExpress.XtraGrid;using DevExpress.XtraGrid.Views.Base;private void gridControl1_Leave(object sender, EventArgs e) {DevExpress.XtraGrid.Views.Base.ColumnView view = gridControl1.FocusedView as ColumnView; view.CloseEditor();
阅读全文
posted @ 2013-04-22 11:24 chenaran
阅读(301)
评论(0)
推荐(0)
2013年3月6日
C# 禁用鼠标中间键
摘要: 关于 C# System.Windows.Forms.NumericUpDown 控件,如何禁用鼠标中间键?方法如下:声明一个事件:Num_DiscountAmount.MouseWheel +=new MouseEventHandler(Num_DiscountAmount_MouseWheel);编写一个事件private void Num_DiscountAmount_MouseWheel(object sender, MouseEventArgs e) { HandledMouseEventArgs h = e as HandledMouseEve...
阅读全文
posted @ 2013-03-06 12:18 chenaran
阅读(694)
评论(0)
推荐(0)
2013年2月22日
C# System.Reflection
摘要: 在使用.NET创建的程序或组件时,元数据(metadata)和代码(code)都存储于“自成一体”的单元中,这个单元称为装配件。我们可以在程序运行期间访问这些信息。在System.Reflection中有这样一个class————Assembly,我们可以通过它来加载一个装配件。方法如下:Assembly assm=Assembly.LoadFrom(fileName);其中filename是要加载的装配件的文件名称(带路径)。接下来,我们就可以通过使用System.Reflection内提供的Info classes来获取装配件中的信息了。首先让我们看一下这些Info classes:M..
阅读全文
posted @ 2013-02-22 17:37 chenaran
阅读(405)
评论(0)
推荐(0)
How to Use .Net Remoting Using C#
摘要: 转载于:http://ipmingsee.blog.163.com/blog/static/7126372012013111923547/或:http://support.microsoft.com/kb/323490/zh-cn
阅读全文
posted @ 2013-02-22 16:23 chenaran
阅读(247)
评论(0)
推荐(0)
How to: Build a Client Application
摘要: 转载于:http://msdn.microsoft.com/en-us/library/y6dc64f2(v=vs.80).aspx
阅读全文
posted @ 2013-02-22 16:01 chenaran
阅读(258)
评论(0)
推荐(1)
2013年2月19日
C# 用批处理执行事务
摘要: 有时候写一些操作数据库是,要执行多条Sql语句,不得不用事务处理。用程式方法: public static bool ExecuteSqlTransaction(ArrayList list) { bool yes = false; using (SqlConnection con = new SqlConnection(_ConnectString)) { con.Open(); using (SqlTransaction trans = con.Beg...
阅读全文
posted @ 2013-02-19 17:20 chenaran
阅读(712)
评论(0)
推荐(0)
2012年9月14日
DataTable 中的数据,行转列显示
摘要: private DataTable RowToCol(DataTable Dt_newData) { DataTable Dt_Return = new DataTable(); DataColumn col = new DataColumn(); col.ColumnName = "Title"; col.Caption = "Title"; Dt_Return.Columns.Add(col); List<string> colName = n...
阅读全文
posted @ 2012-09-14 08:51 chenaran
阅读(290)
评论(0)
推荐(0)
2011年7月27日
silverlight combobox image label
摘要: 在combobox 同时显示图片,文字,如图:引用:using System.Windows.Media.Imaging;功能函数如下: /// <summary> /// combobox 下拉同時顯示 圖片文字 /// </summary> /// <param name="_cmbImg"></param> /// <param name="ImgPath"></param> /// <param name="Title"></param&
阅读全文
posted @ 2011-07-27 16:22 chenaran
阅读(444)
评论(2)
推荐(1)
公告