-
关于datagridview控件的简单例子,更容易理解一些
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;namespace DataGridViewSample{ public partial class Form1 : Form { public static List Tests = new List(); public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { this.dataGridView1.DataSource = Tests; } private void button1_Click(object sender, EventArgs e) { frmAdd form = new frmAdd(null); if (form.ShowDialog() == DialogResult.OK) { this.dataGridView1.DataSource = null; this.dataGridView1.DataSource = Tests; } } private void button2_Click(object sender, EventArgs e) { if (this.dataGridView1.SelectedRows != null) { frmAdd form = new frmAdd(new Test( Convert.ToInt32(this.dataGridView1.SelectedRows[0].Cells[0].Value), Convert.ToDecimal(this.dataGridView1.SelectedRows[0].Cells[1].Value), Convert.ToDateTime(this.dataGridView1.SelectedRows[0].Cells[2].Value), this.dataGridView1.SelectedRows[0].Cells[3].Value.ToString())); if (form.ShowDialog() == DialogResult.OK) { this.dataGridView1.DataSource = null; this.dataGridView1.DataSource = Tests; } } } private void button3_Click(object sender, EventArgs e) { //使用前面示例中的代码,用DataGridView或者List来做导出都是可以的 } } public class Test { public Test(int id, decimal voltage, DateTime record, string remark) { ID = id; Voltage = voltage; Record = record; Remark = remark; } public int ID { get; set; } public decimal Voltage { get; set; } public DateTime Record { get; set; } public string Remark { get; set; } }}
- 2015-06-11下载
- 积分:1
-
ASP.NET 3.5商用开发架构精解 随书完整源代码下载
ASP.NET 3.5商用开发架构精解 随书完整源代码下载
- 2014-08-13下载
- 积分:1
-
非Com形式 创建 桌面快捷方式 附完整类源码
调用方法: Shortcut sc = new Shortcut(); sc.Path = "目标文件地址"; sc.Arguments = "启动参数"; sc.WorkingDirectory = "启动文件的文件夹"; sc.Description = "描述"; sc.Save("这个快捷方式保存在哪");
- 2013-07-14下载
- 积分:1
-
C# 图片显示器
【实例简介】可以设置图片播放等待时间
- 2021-11-30 00:45:45下载
- 积分:1
-
.NET Reflector 5.0 使用例子(反编译软件)
.NET Reflector 5.0 Release Notes 28 December 2006 Reflector is a class browser for .NET components. It allows browsing and searching the meta data, IL instructions, resources and XML documentation stored in a .NET assembly. Reflector was first released in October 2000 running on .NET Framework 1.0 Beta. LINQ and .NET Framework 3.5: Reflector supports query expressions and other concepts introduced in C# 3.5. To enable this feature select ".NET 3.5" under View, Options, Disassembler, Optimization. .NET Framework compatibility: Reflector runs on all versions of the .NET Framework using its own assembly loading infrastructure which does not rely on the Reflection API. For example, Reflector can load .NET Framework 2.0 assemblies without having the .NET Framework 2.0 installed. Assembly Lists: When launched for the first time, Reflector allows you to choose a default set of assemblies. The list of assemblies is then stored in the Reflector.cfg file and will be loaded next time you open the program. Reflector allows creating multiple assembly lists and switching between the lists using the File, Open List dialog. To choose a different set of default assemblies for the current assembly list you should remove all assemblies from the list (DEL) and invoke the Refresh command (F5). Assembly Cache: When resolving an assembly reference, Reflector will first search the local path next to the assembly holding the reference and then falls back to the cache directories defined in the Reflector.cfg file. Reflector does not search the Global Assembly Cache (GAC) unless you add "%SystemRoot%Assembly" to the cache directories list. Assembly Versioning: By default, assembly version numbers are ignored when resolving type and member references. You can enable side-by-side versioning in the options dialog but it is suggested to avoid this if possible. Add-Ins: Information about the Reflector add-in model can be found here. The most recent version of .NET Reflector is available here. Disclaimer: This software is provided "AS IS" with no warranties of any kind. The entire risk arising out of the use or performance of the software is with you.
- 2015-06-15下载
- 积分:1
-
ASP.NET学生管理系统(论文+源码+数据库)
通过调研目前教学管理系统中的成绩管理子系统,了解成绩管理子系统的业务流程;通过分析比较,结合用户对成绩管理子系统的改进意见与实现情况,运用面向对象思想方法,设计和实现一个满足功能和性能,并有所创新的成绩管理子系统,以提高成绩管理的自动化、友好性等。本系统基于.NET平台和SQL Server数据库,通过毕业设计,可以使学生对.NET结构下开发B/S模式的分布式三层数据库系统有一个全面的了解。本系统从功能上划分可分为以下几大模块:功能模块管理,组权限管理,学生信息管理,课程信息管理,学生成绩管理,授课信息管理,学生信息查询,学生成绩统计等几大模块。以下将对各子模块进行说明。功能模块管理:将系统功能模块保存到数据库中以便于动态地进行不同用户组权限的分配等操作。本模块包括功能模块的添加,删除,修改等。组权限管理:对用户进行分组,并将权限设置到不同的用户组。学生信息管理模块:输入学生基本信息,并可以对学生信息进行添加、查询、修改、删除。还可以关键字查询并从数据库里调出的学生基本信息.输出学生基本信息,学号、班号、姓名查询的信息结果。课程信息管理:设置课程号,课程名,先修课等课程信息。成绩信息管理模块:输入成绩信息,并可以对成绩信息进行添加、查询、修改、删除。还可以用关键字查询并调出数据库里的学生基本成绩信息的修改、删除等。输出查询的学生成绩信息。授课信息管理:对教师授课信息的调度,安排等信息的管理。学生信息查询:本模块是可对学生成绩进行查询,可按学号,姓名,年龄,所在院系,入学年份等不同条件独立查询或进行模糊查询。学生成绩统计:对学生成绩总分,平均分等进行统计。
- 2019-04-14下载
- 积分:1
-
ASP.net access案例开发
ASP.net access案例开发
- 2015-04-13下载
- 积分:1
-
C#设计一个旋转时钟
该程序是用C#是做一个会走时的旋转时钟
- 2020-06-02下载
- 积分:1
-
sha256源代码
sha256源代码
- 2020-12-11下载
- 积分:1
-
jQuery完全模拟windows系统桌面操作效果
jQuery完全模拟windows系统桌面操作效果
- 2015-05-01下载
- 积分:1