-
将DataGridView中内容导出到Word
Visual C# 2012 将数据生成Word表格文件,将DataGridView中内容导出到Word,这个程序的实现需要使用到几个Office编程库:Interop.Office.dll、Interop.VBIDE.dll、Interop.Word.dll。
实现步骤:实例化SqlConnection连接对象,创建数据库连接,SqlDataAdapter对象,填充DataSet对象,为DataGridView控件设置数据源。然后实例化Word文档对象,声明Word选区,建立Word对象,将数据生成Word表格文件,设置列宽,使用for循环输出列标题数据,最后输出控件中的记录。
- 2022-07-08 20:36:37下载
- 积分:1
-
C# 以浮雕效果显示图片
Visual C# 以浮雕效果显示图像控件中的图像,private void Window_Loaded(object sender, RoutedEventArgs e)
{//以浮雕效果显示图像控件中的图像
var MyEmbossBitmapEffect = new System.Windows.Media.Effects.EmbossBitmapEffect();
MyEmbossBitmapEffect.LightAngle = 320;
MyEmbossBitmapEffect.Relief = 0.8;
this.image1.BitmapEffect = MyEmbossBitmapEffect;
}
- 2022-05-23 11:20:57下载
- 积分:1
-
C#调用存储过程显示客户的订单金额
Visual C# 通过调用存储过程显示客户的订单金额,获取客户的订单总额(获取存储过程参数的返回值):
private void button1_Click(object sender, EventArgs e)
{//获取客户的订单总额(获取存储过程参数的返回值)
DataClasses1DataContext MyDataContext = new DataClasses1DataContext();
string MyCustomer = "alfki";
decimal? MyAmount = 0;
MyDataContext.CustOrderTotal(MyCustomer, ref MyAmount);
MessageBox.Show(MyCustomer+"客户的订单金额是:"+MyAmount.ToString(),"信息提示",MessageBoxButtons.OK);
}
- 2022-10-21 01:10:03下载
- 积分:1
-
C# 设置制表位控制文本项的输出位置
C# 设置制表位控制文本项的输出位置,将文字输出成表格的样式:
设置制表位控制文本项的输出位置
string MyText = " 姓名 高等数学 离散数学 数据结构
";
MyText = MyText + "李开斌 95 81 92
";
MyText = MyText + "汤小敏 78 84 75
";
MyText = MyText + "汤柱兰 84 76 82
";
MyText = MyText + "蒋兰坤 85 92 66
";
MyText = MyText + "黄 丽 83 91 75
";
MyText = MyText + "张中姣 75 88 82
";
FontFamily MyFontFamily = new FontFamily("宋体");
Font MyFont = new Font(MyFontFamily, 10, FontStyle.Regular, GraphicsUnit.Point);
Rectangle MyRect = new Rectangle(25, 70, 280, 110);
SolidBrush MyBrush = new SolidBrush(Color.FromArgb(255, 0, 128, 255));
StringFormat MyFormat = new StringFormat();
float[] MyTabArray = { 60, 80, 80 };
MyFormat.SetTabStops(0, MyTabArray);
e.Graphics.DrawString(MyText, MyFont, MyBrush, MyRect, MyFormat);
- 2022-02-28 17:10:41下载
- 积分:1
-
C# 使用Graphics方法生成字符串的验证码图片
C# Graphics方法生成字符串的验证码图片,在C#的程序中生成一个随机生成器 ,然后随机生成字符,然后使用Graphics方法画图片的背景噪音线 定义颜色和字体,画图片的前景噪音点,画图片的边框线等。这是个比较简单的生成验证码的方法,验证码的使用率偏高,因此作为一个C#生成验证码的初级例子,本源码有必要学习研究。
- 2022-02-26 05:51:46下载
- 积分:1
-
C# 为DataGridView控件设置交替行样式(隔行换色)
C# 为DataGridView控件设置交替行样式,也就是大家熟悉的隔行换色功能,每一行数据的底色都不一样,这样可更清淅的浏览表格,在WEB开发中,这也是一个受欢迎的功能,在C# WinForm编程中,同样是个既实用又美观的功能。
本示例测试需要连接好SQL数据库,否则DataGridView未填充数据,不能看出多行隔行换色效果。其实实现这一功能,最核心的几行代码如下:
为DataGridView控件设置交替行样式
this.customersDataGridView.RowsDefaultCellStyle.BackColor = Color.SeaGreen ;
this.customersDataGridView.AlternatingRowsDefaultCellStyle.BackColor =Color.Cyan;
- 2022-11-20 06:00:03下载
- 积分:1
-
PIXHAWK_Firmware-master 1.39版源码
PIXHAWK_Firmware-master 1.39版最新源码,希对您有所帮助.
- 2023-04-20 04:10:14下载
- 积分:1
-
7Zip
This file is part of SevenZipSharp. SevenZipSharp is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SevenZipSharp is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with SevenZipSharp. If not, see .
- 2022-07-20 00:09:31下载
- 积分:1
-
C# Hospital MIS 医院业务信息维护系统
C# Hospital MIS 医院业务信息维护系统,基于VisualC# 2012编写开发的,采用SQLSERVER数据库,内含建库脚本,编译或修改调试本源码前请先重建数据库,并连接好。
本医院业务系统完成的功能有:
导医服务、病人登记、病人预约、前台交费、约品退费、欠费催款、评价管理、医师服务、开医令、药房服务、药品管理、发放药品、退药入库、门诊统计、按科室统计、每日统计、交接班汇总、基本设置、检验设置、检查设置、科室设置、员工值班设置、用户管理、折扣卡设置等功能。
- 2022-07-16 15:03:12下载
- 积分:1
-
CS快速开发框架源码
花了真金白银买的www.csframework.com、www.cscode.net CS框架网的快速开发框架源码!绝对是高质量的代码!不是市面上一些垃圾代码!功能太强大了,三言两语说不清楚,具体可以看网站介绍。
- 2022-07-18 13:08:30下载
- 积分:1