资源简介
基于Mysql数据库的C#实现简单的登录注册功能
代码片段和文件信息
/*
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Excel = Microsoft.Office.Interop.Excel;
namespace test01
{
class Account
{
public int ID { get; set; }
public double Balance { get; set; }
static void DisplayInExcel(IEnumerable accounts)
{
var excelApp = new Excel.Application();
// Make the object visible.
excelApp.Visible = true;
// Create a new empty workbook and add it to the collection returned
// by property Workbooks. The new workbook becomes the active workbook.
// Add has an optional parameter for specifying a praticular template.
// Because no argument is sent in this example Add creates a new workbook.
excelApp.Workbooks.Add();
// This example uses a single workSheet. The explicit type casting is
// removed in a later procedure.
Excel._Worksheet workSheet = (Excel.Worksheet)excelApp.ActiveSheet;
workSheet.Cells[1 “A“] = “ID Number“;
workSheet.Cells[1 “B“] = “Current Balance“;
var row = 1;
foreach (var acct in accounts)
{
row++;
workSheet.Cells[row “A“] = acct.ID;
workSheet.Cells[row “B“] = acct.Balance;
}
workSheet.Columns[1].AutoFit();
workSheet.Columns[2].AutoFit();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Excel = Microsoft.Office.Interop.Excel;
namespace test01
{
public class Account
{
public int ID { get; set; }
public double Balance { get; set; }
}
class Program
{
static void DisplayInExcel(IEnumerable accounts)
{
var excelApp = new Excel.Application();
// Make the object visible.
excelApp.Visible = true;
// Create a new empty workbook and add it to the collection returned
// by property Workbooks. The new workbook becomes the active workbook.
// Add has an optional parameter for specifying a praticular template.
// Because no argument is sent in this example Add creates a new workbook.
excelApp.Workbooks.Add();
// This example uses a single workSheet. The explicit type casting is
// removed in a later procedure.
Excel._Worksheet workSheet = (Excel.Worksheet)excelApp.ActiveSheet;
workSheet.Cells[1 “A“] = “ID Number“;
workSheet.Cells[1 “B“] = “Current Balance“;
var row = 1;
foreach (var acct in accounts)
{
row++;
workSheet.Cells[row “A“] = acct.ID;
workSheet.Cells[row “B“] = acct.Balance;
}
w 属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4561 2017-07-03 14:48 test01\test01\Account.cs
文件 385 2017-07-04 15:32 test01\test01\app.config
文件 9014 2017-07-03 16:20 test01\test01\bin\Debug\Book1.xlsx
文件 14848 2017-07-05 10:44 test01\test01\bin\Debug\test01.exe
文件 385 2017-07-04 15:32 test01\test01\bin\Debug\test01.exe.config
文件 34304 2017-07-05 10:44 test01\test01\bin\Debug\test01.pdb
文件 11592 2017-07-05 10:55 test01\test01\bin\Debug\test01.vshost.exe
文件 385 2017-07-04 15:32 test01\test01\bin\Debug\test01.vshost.exe.config
文件 490 2015-07-10 19:01 test01\test01\bin\Debug\test01.vshost.exe.manifest
..A.SH. 165 2017-07-04 10:35 test01\test01\bin\Debug\~$Book1.xlsx
文件 5249 2017-07-05 10:44 test01\test01\Form1.cs
文件 6916 2017-07-05 10:26 test01\test01\Form1.Designer.cs
文件 5817 2017-07-04 21:40 test01\test01\Form1.resx
文件 2458 2017-07-05 10:36 test01\test01\Form2.cs
文件 5648 2017-07-05 09:37 test01\test01\Form2.Designer.cs
文件 5817 2017-07-05 09:37 test01\test01\Form2.resx
文件 5420 2017-07-04 15:03 test01\test01\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6700 2017-07-05 10:44 test01\test01\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 647 2017-07-05 10:55 test01\test01\obj\Debug\test01.csproj.FileListAbsolute.txt
文件 1033 2017-07-05 10:02 test01\test01\obj\Debug\test01.csproj.GenerateResource.Cache
文件 34390 2017-07-05 10:02 test01\test01\obj\Debug\test01.csprojResolveAssemblyReference.cache
文件 14848 2017-07-05 10:44 test01\test01\obj\Debug\test01.exe
文件 180 2017-07-05 10:02 test01\test01\obj\Debug\test01.Form1.resources
文件 180 2017-07-05 10:02 test01\test01\obj\Debug\test01.Form2.resources
文件 34304 2017-07-05 10:44 test01\test01\obj\Debug\test01.pdb
文件 180 2017-07-05 10:02 test01\test01\obj\Debug\test01.Properties.Resources.resources
文件 5420 2017-07-03 14:29 test01\test01\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6418 2017-07-04 14:56 test01\test01\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 947 2017-07-04 15:02 test01\test01\obj\x86\Debug\test01.csproj.FileListAbsolute.txt
文件 975 2017-07-04 15:02 test01\test01\obj\x86\Debug\test01.csproj.GenerateResource.Cache
............此处省略27个文件信息
- 上一篇:activemq 接收文件流 C#
- 下一篇:C#控制系统声音大小
相关资源
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
- C#自定义控件
- 基于c#的实验室设备管理系统621530
- C# 使用ListView控件实现图片浏览器(源
- C#简单窗体聊天程序
- C#指纹识别系统程序 报告
- c# 高校档案信息管理系统
川公网安备 51152502000135号
评论
共有 条评论