C#导出DataGridView到Excel、XML类
using System; using System.Collections.Generic; using System.Text; using System.ComponentModel; using System.Data; using Microsoft.Office.Interop.Excel; using System.IO; using System.Windows.Forms;[@more@]namespace EXcel.BLL { public class EXcelManager { public EXcelManager() { } #region 导出到EXcel private static System.Windows.Forms.DataGridView gridView; private static System.Windows.Forms.ToolStripProgressBar Progress
C#对DataGridView进行添加、修改、删除数据操作
数据库用的是本地服务器(MySql):设定变量: MySqlConnection conn; MySqlDataAdapter adapter; MySqlTransaction trans;[@more@]1. // 数据库联接 private System.Data.DataTable dbconn(string strSql) { string strconn = "host=localhost;database=test;user id=root;password="; conn = new MySqlConnection(); conn.ConnectionString = strconn; conn.Open(); this.adapter = new MySqlDataAdapter(strSql, conn);
C#里List的用法
C#里List的用法主程序代码:static void Main(string[] args) { ClassList listClass = new ClassList(); Console.WriteLine("请输入第个字符串"); string a = Console.ReadLine(); Console.WriteLine("请输入第二个字符串"); string b = Console.ReadLine(); foreach (string n in listClass.strList(a, b)) { Console.WriteLine(n); } 类:class ClassList { public List
asp.net教程-C#中使用XML——编写XML
在我的上一篇文章《C#中使用XML——读取XML》中和大家讨论了如何使用.NET Framework中提供的类在C#中读取XML以及读取的一些相关概念,那么今天就说一说如何在C#中编写XML文档,起初我觉得用编程的方式去编写XML简直就是自讨苦吃,后来想想还是觉得挺有用的,我想Microsoft那班家伙能编出这些类来应该不是仅仅为了向比尔i盖茨交差吧!至于它的用处嘛……比如说做安装程序啊!我们可以根据在安装过程中用户所选的选项以及一些设置来生成相应的XML文档再根据XML文档来初始化我们的应用程序。空洞的话不说那么多了,下面我们来了解一下具体的实
C#系统网络编程
系统网络编程: Visual C#基于组件的开发http://download.chinaitlab.com/soft/9297.htmC# 开发编码规范http://download.chinaitlab.com/soft/7991.htmC#知识类库http://download.chinaitlab.com/soft/12120.htm[@more@]C#100例http://download.chinaitlab.com/soft/11826.htmASP.NET 2.0 & C# 2.0学习资料http://download.chinaitlab.com/soft/10330.htmC#深入浅出全接触http://download.chinaitlab.com/soft/6992.htmC#百例http://download.chinaitlab.com/soft/7638.htmVisual C# .NEThttp://download.chinaitlab.com/soft/6023.htm
界面与窗体
界面与窗体: C# 专业项目实例开发http://download.chinaitlab.com/soft/12587.htmC#设计模式http://download.chinaitlab.com/soft/11824.htmVisuak C#.NET面向对象程序设计http://download.chinaitlab.com/soft/9130.htm[@more@]C# COM+ Programming(英文)http://download.chinaitlab.com/soft/7855.htmC# WINDOWS程序设计http://download.chinaitlab.com/soft/6097.htmWindows应用高级编程-C#编程篇http://download.chinaitlab.com/soft/4992.htmVisual C#图像处理程序设计实例http://download.chinaitlab.com/soft/11541.htmProgrammi
c#基础教程
基础教程: Visual C#.NET入门与提高http://download.chinaitlab.com/soft/6330.htm使用Visual C# 开发asp.NET入门http://download.chinaitlab.com/soft/4114.htmASP.NET 基础教程-C#案例版http://download.chinaitlab.com/soft/9395.htm[@more@]基础教程: Visual C#.NET入门与提高http://download.chinaitlab.com/soft/6330.htm使用Visual C# 开发asp.NET入门http://download.chinaitlab.com/soft/4114.htmASP.NET 基础教程-C#案例版http://download.chinaitlab.com/soft/9395.htmASP.NET C#教程http://download.chinaitlab.com/soft/6640
c#视频学习
Microsoft.net 框架概述http://download.chinaitlab.com/soft/3346.htm[@more@]Microsoft.net 框架概述http://download.chinaitlab.com/soft/3346.htmLearnKey C# 英文视频 01http://download.chinaitlab.com/soft/3634.htmLearnKey C# 英文视频 02http://download.chinaitlab.com/soft/3635.htmLearnKey C# 英文视频 03http://download.chinaitlab.com/soft/3636.htmLearnKey C# 英文视频 04http://download.chinaitlab.com/soft/3637.htmLearnKey C# 英文视频 05http://download.chinaitlab.com/soft/3638.htmASP.NET中DataGrid的高级技