-
IT行业资产管理系统C#+数据库
IT行业资产管理系统C#+数据库,运行后请先登录,在登录窗口中,有验证码功能。程序主界面菜单功能:资产管理、软件设置、服务项目、资产统计报表、服务统计报表、系统设置、帮助文件。若没有登录,则软件会强制退出。也就是说,本软件需要登录后才能使用。
- 2022-02-06 17:00:09下载
- 积分:1
-
C# FTP客户端模块 上传下载文件显示进度
C# FTP客户端模块 上传下载文件显示进度,本示例可通过HTTP、FTP下载文件,可通过FTP上传文件,请设定好服务器IP地址再测试,进度条在窗口的最上方。
percent = (float)totalDownloadedByte / (float)totalBytes * 100;
label1.Text = "当前补丁下载进度" + percent.ToString() + "%";
Application.DoEvents(); //必须加注这句代码,否则label1将因为循环执行太快而来不及显示信息
reqFTP.Credentials = new NetworkCredential(ftpUserID, ftpPassword);//用户,密码
reqFTP.Method = WebRequestMethods.Ftp.UploadFile;//向服务器发出下载请求命令
reqFTP.ContentLength = finfo.Length;//为request指定上传文件的大小
- 2022-03-23 13:46:25下载
- 积分:1
-
w5500 DHCP 客户端 源代码
官方的DHCP 客户端源代码,经本人亲自验证 100% 可用。
- 2023-05-25 06:20:04下载
- 积分:1
-
C# 异步加载图像的方法附示例源码
C# 异步加载图像的方法附示例源码,异步加载技术对提升软件内容加载性能很有帮助,不但可以异步加载图片,还可以用于异步加载数据库内容,只是方法不同,本例是异步加载图片,这个也是使用比较多的一种情况,希望对C#初学者有所帮助。
运行本示例exe后,选择一张图片,则会异步加载这张图像,并显示当前图像文件加载进度,如效果图所示。
- 2022-06-06 15:30:23下载
- 积分:1
-
C# 是行提交方式插入、删除、更新数据库记录
C# 是行提交方式插入、删除、更新数据库记录,本实例小程序主要演示了以行提交方式插入数据库记录、以行提交方式修改数据库记录、以行提交方式删除数据库记录、使用带有列值的Update()方法修改记录、使用带有列值的Delete()方法删除记录、使用带有列值的Insert()方法插入记录,对应的各个功能核心代码如下:
private void button2_Click(object sender, EventArgs e)
{//以行提交方式修改数据库记录(首先以添加新数据源方式新增NorthwindDataSet)
NorthwindDataSet.ShippersRow MyRow;
MyRow = this.northwindDataSet.Shippers.FindByShipperID(1);
MyRow.Phone = "13996060872";
this.shippersTableAdapter.Update(this.northwindDataSet.Shippers);
}
private void button4_Click(object sender, EventArgs e)
{//使用带有列值的Update()方法修改记录
NorthwindDataSetTableAdapters.ShippersTableAdapter MyAdapter =
new MyForm.NorthwindDataSetTableAdapters.ShippersTableAdapter();
MyAdapter.Update("Speedy Express", "13036371686", 1, "Speedy Express", "13996060872");
this.shippersTableAdapter.Fill(this.northwindDataSet.Shippers);
}
private void button3_Click(object sender, EventArgs e)
{//以行提交方式删除数据库记录(首先以添加新数据源方式新增NorthwindDataSet)
Northwi
- 2023-02-24 10:00:04下载
- 积分:1
-
C# 使用XmlWriter写XML文件
C# 使用XmlWriter写XML文件,为使文件易读,使用缩进,引用样式,写入注释。写一个元素(根元素),比如genre 属性、ISBN 属性、书名元素、价格元素、写入 CDATA,缓冲器内的内容写入文件。然后加载文件,将XML文件的内容显示在控制台,最后等待用户阅读。通过这个完整的写入XML文件的实例,将XmlWriter的用法完全展现给用户,让你更进一步的了解XmlWriter的用法。
- 2022-05-28 19:11:35下载
- 积分:1
-
C#检查CheckBox控件是否被选中
C#检查CheckBox复选框控件是否被选中,或者说是判断用户是否单击了checkbox按钮,可用于用户输入界面中,本示例提供了完整的复选框判断机制,有需要的可参考以下代码:
private void checkBox1_Click(object sender, EventArgs e)
{
if (checkBox1.CheckState == CheckState.Checked)
{
MessageBox.Show("CheckBox控件被选中");
}
else
{
MessageBox.Show("CheckBox控件选择被取消");
}
}
- 2022-09-15 05:45:03下载
- 积分:1
-
C# 设置应用程序背景颜色
C# 设置应用程序背景颜色,通过调用Windows调色板,来选取颜色,然后程序将颜色值赋值给窗口,此盒子可设置斜体的颜色值,运行效果如参考截图所示,核心代码请看以下代码片段:
private void Form1_Load(object sender, EventArgs e)
{//显示应用程序背景颜色
//先打开“Properties”,添加一个System.Drawing.Color类型的变量MyBackColor
this.BackColor = Properties.Settings.Default.MyBackColor;
}
private void button1_Click(object sender, EventArgs e)
{//设置应用程序背景颜色(在运行时编写用户设置)
if(this.colorDialog1.ShowDialog()==DialogResult.OK)
{
Properties.Settings.Default.MyBackColor = this.colorDialog1.Color;
Properties.Settings.Default.Save();
this.BackColor = Properties.Settings.Default.MyBackColor;
}
}
- 2022-06-22 05:36:16下载
- 积分:1
-
C#使用SqlDataAdapter对象的Fill方法填充DataSet
C#使用SqlDataAdapter对象的Fill方法填充DataSet,具体是调用DataSet的Copy方法复制DataSet中的内容,完成填充的功能:
private void Form1_Load(object sender, EventArgs e)
{
//实例化SqlConnection变量conn,连接数据库
conn = new SqlConnection("server=.;database=db_14;uid=sa;pwd=");
//创建一个SqlCommand对象
SqlCommand cmd = new SqlCommand("select * from tb_test", conn);
SqlDataAdapter sda = new SqlDataAdapter();//创建一个SqlDataAdapter对象
//设置SqlDataAdapter对象的SelectCommand属性,设置执行的SQL语句
sda.SelectCommand = cmd;
ds = new DataSet(); //实例化DataSet
sda.Fill(ds, "test");//使用SqlDataAdapter对象的Fill方法填充DataSet
dataGridView1.DataSource = ds.Tables[0];//设置dataGridView1的数据源
}
private void button1_Click(object sender, EventArgs e)
{
DataSet ds1 = ds.Copy();//调用DataSet的Copy方法复制ds中的内容
dataGridView2.DataSource = ds1.Tables[0];//将ds1作为dataGridView2的数据源
}
- 2022-11-04 09:50:03下载
- 积分: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