摘要: C# 快速入门[英]Aisha Ikram 著 野比 译来源:www.codeproject.com(Quick C#)译注:原文极长(约 1.5 万字),但浅显易懂,讲解生动活泼,请耐心阅读在帖子里阅读做好心理准备,极长在一小时内学会 C#。使用例程,简单却完整的探索 C# 语言的构造和特点。本文... 阅读全文
posted @ 2012-05-29 17:48 风与雨无阻 阅读(433) 评论(0) 推荐(0) 编辑
摘要: /// /// 显示药品类别列表/// /// public void SetCommondCategory(TreeView tv){ //先清除原有的节点 tv.Nodes.Clear(); sb.Remove(0, sb.Length); sb.Append("select categoryN... 阅读全文
posted @ 2012-05-27 10:57 风与雨无阻 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 行上移下移 #region上移位置//////选中行上移方法//////privatevoidListViewUpMove(ListView listView){if(listView.SelectedItems.Count==0){return;}listView.BeginUpdate();if... 阅读全文
posted @ 2012-05-27 10:55 风与雨无阻 阅读(1488) 评论(0) 推荐(0) 编辑
摘要: /// /// DataGridView 编辑单元格的控件时 /// private void DgvToxicologicalMaintenance_EditingControlShowing(object sender, DataGridViewEditingControlShowingEv... 阅读全文
posted @ 2012-05-27 10:54 风与雨无阻 阅读(759) 评论(0) 推荐(0) 编辑
摘要: 方法一(推荐使用这个方法,因为他可以另存为,哪个更快就要使用者测试了,这里只提供方法): /// /// 收费项目---Excel/// private void BtnExcel_Click(object sender, EventArgs e){ if (DgvFeeInspection.Row... 阅读全文
posted @ 2012-05-27 10:52 风与雨无阻 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 怎么将ListView控件中的数据导出到Excel?首先 你需要添加引用Microsoft Excel 11.0 Object Library 添加方法:选择项目->引用->右击“添加引用”->选择COM 找到上面组件—>点击“确定”。 实现代码如下: private void 导出数据_Click... 阅读全文
posted @ 2012-05-27 10:51 风与雨无阻 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 一:得到列的索引 int ColumnIndex = this.DgvDiagnosisList.CurrentCell.ColumnIndex;//获取列的索引 二:得到当前选中行并得到该行的某一列的值 int RowIndex = this.DgvDiagnosisList.CurrentRow... 阅读全文
posted @ 2012-05-27 10:50 风与雨无阻 阅读(446) 评论(0) 推荐(0) 编辑
摘要: ///首先新建一个DataGridViewHelper类 using System;using System.Collections.Generic;using System.Text;using System.Windows.Forms;using System.Drawing; namespa... 阅读全文
posted @ 2012-05-27 10:50 风与雨无阻 阅读(677) 评论(0) 推荐(0) 编辑
摘要: /// /// 选择不同的标记/// /// /// private void comboBox1_TextChanged(object sender, EventArgs e){DataGridViewCell dgvcell = (DataGridViewCell)this.comboBox1.... 阅读全文
posted @ 2012-05-27 10:49 风与雨无阻 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 对话框中我们常用了以下几种:1、文件对话框(FileDialog) 它又常用到两个: 打开文件对话框(OpenFileDialog) 保存文件对话(SaveFileDialog)2、字体对话框(FontDialog)3、颜色对话框(ColorDialog)4、打印预浏对话框(PrintPreview... 阅读全文
posted @ 2012-05-27 10:47 风与雨无阻 阅读(1598) 评论(0) 推荐(0) 编辑