资源简介
小区物业管理系统 管理 C# sql2005
代码片段和文件信息
//文件名:BuildingForm.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Office.Interop.Excel;
using System.Reflection;
using Microsoft.Office.Core;
namespace MyCommunity
{
public partial class BuildingForm : Form
{
public BuildingForm()
{
InitializeComponent();
}
public string MyCommunity;
private void 楼栋信息BindingNavigatorSaveItem_Click(object sender EventArgs e)
{
if ((Convert.ToDouble(this.总户数TextBox.Text) - Convert.ToDouble(this.入住户数TextBox.Text) != Convert.ToDouble(this.空置户数TextBox.Text)) || (Convert.ToDouble(this.总户数TextBox.Text) - Convert.ToDouble(this.住宅户数TextBox.Text) != Convert.ToDouble(this.商用户数TextBox.Text)))
{
MessageBox.Show(“总户数、入住户数、空置户数、住宅户数、商用户数其中之一有错!“ “信息提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
return;
}
this.Validate();
this.楼栋信息BindingSource.EndEdit();
this.楼栋信息TableAdapter.Update(this.dBCommunityDataSet.楼栋信息);
}
private void BuildingForm_Load(object sender EventArgs e)
{
// TODO: 这行代码将数据加载到表“dBCommunityDataSet.楼栋信息”中
this.楼栋信息TableAdapter.Fill(this.dBCommunityDataSet.楼栋信息);
}
private void 打印ToolStripButton_Click(object sender EventArgs e)
{//打印楼栋信息
ApplicationClass MyExcel;
Workbooks MyWorkBooks;
Workbook MyWorkBook;
Worksheet MyWorkSheet;
char MyColumns;
Range MyRange;
object[] MyData = new object[500 35];
int i j;
MyExcel = new ApplicationClass();
MyExcel.Visible = true;
if (MyExcel == null)
{
MessageBox.Show(“Excel程序无法启动!“ “信息提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
return;
}
MyWorkBooks = MyExcel.Workbooks;
MyWorkBook = MyWorkBooks.Add(Missing.Value);
MyWorkSheet = (Worksheet)MyWorkBook.Worksheets[1];
MyColumns = (char)(this.dBCommunityDataSet.楼栋信息.Columns.Count + 64);
MyRange = MyWorkSheet.get_Range(“A5“ MyColumns.ToString() + “5“);
int Count = 0;
foreach (DataColumn MyNewColumn in this.dBCommunityDataSet.楼栋信息.Columns)
{
MyData[0 Count] = MyNewColumn.ColumnName;
Count = Count + 1;
}
j = 1;
//输出数据库记录
foreach (DataRow MyRow in this.dBCommunityDataSet.楼栋信息.Rows)
{
for (i = 0; i < this.dBCommunityDataSet.楼栋信息.Columns.Count; i++)
{
MyData[j i] = MyRow[i].ToString();
}
j++;
}
MyRange = MyRange.get_Resize(this.dBCommunityDataSet.楼栋信息.Rows.Count + 1 this.dBCommunityDataSet.楼栋信息.Columns.Count);
MyRange.Value2 = MyData;
MyRange.EntireColumn.AutoFit();
MyWorkSheet.Cells[2 2] = this.MyCommunity + “楼栋信息表“;
Range MyRange22 = MyWorkSheet.get_Range(“B2“ “B2“);
MyRange22.Font.Bold = true;
MyRange22.
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 441 2007-11-29 08:41 第1章 小区物业管理系统\MyCommunity\MyCommunity\app.config
文件 5632 2005-11-11 22:25 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Debug\MyCommunity.vshost.exe
文件 2093056 2007-12-07 14:45 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\Data\DBCommunity.mdb
文件 66964 2007-07-07 09:03 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\Data\GodLakeHome.JPG
文件 766 2006-12-10 16:49 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\Data\GodLakeLogo.ico
文件 55218 2007-06-27 09:39 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\Data\HuaMeiHome.jpg
文件 2238 1996-07-04 00:00 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\Data\HuaMeiLogo.ico
文件 72398 2007-12-01 16:44 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\Data\ShowGodLakeHome.JPG
文件 62013 2007-10-08 21:14 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\Data\ShowHuaMeiHome.jpg
文件 7168 2007-11-29 15:10 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\Interop.IasHelperLib.dll
文件 839680 2007-12-07 14:35 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\MyCommunity.exe
文件 441 2007-11-29 08:41 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\MyCommunity.exe.config
文件 927232 2007-12-07 14:35 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\MyCommunity.pdb
文件 5632 2005-11-11 22:25 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\MyCommunity.vshost.exe
文件 441 2007-11-29 08:41 第1章 小区物业管理系统\MyCommunity\MyCommunity\bin\Release\MyCommunity.vshost.exe.config
文件 3436 2007-12-01 16:51 第1章 小区物业管理系统\MyCommunity\MyCommunity\BuildingForm.cs
文件 46281 2007-11-29 15:13 第1章 小区物业管理系统\MyCommunity\MyCommunity\BuildingForm.Designer.cs
文件 16374 2007-11-29 15:13 第1章 小区物业管理系统\MyCommunity\MyCommunity\BuildingForm.resx
文件 2785 2007-12-01 08:53 第1章 小区物业管理系统\MyCommunity\MyCommunity\ChangeUserPasswordForm.cs
文件 8760 2007-11-29 11:19 第1章 小区物业管理系统\MyCommunity\MyCommunity\ChangeUserPasswordForm.Designer.cs
文件 7080 2007-11-29 11:19 第1章 小区物业管理系统\MyCommunity\MyCommunity\ChangeUserPasswordForm.resx
文件 3125 2007-12-01 08:55 第1章 小区物业管理系统\MyCommunity\MyCommunity\CommonPropertyForm.cs
文件 39951 2007-11-29 15:37 第1章 小区物业管理系统\MyCommunity\MyCommunity\CommonPropertyForm.Designer.cs
文件 15417 2007-11-29 15:37 第1章 小区物业管理系统\MyCommunity\MyCommunity\CommonPropertyForm.resx
文件 6358 2007-12-01 08:57 第1章 小区物业管理系统\MyCommunity\MyCommunity\CommonRepairForm.cs
文件 51940 2007-11-30 15:14 第1章 小区物业管理系统\MyCommunity\MyCommunity\CommonRepairForm.Designer.cs
文件 33375 2007-11-30 15:14 第1章 小区物业管理系统\MyCommunity\MyCommunity\CommonRepairForm.resx
文件 2402 2007-12-01 16:40 第1章 小区物业管理系统\MyCommunity\MyCommunity\CommunityForm.cs
文件 43033 2007-12-01 16:40 第1章 小区物业管理系统\MyCommunity\MyCommunity\CommunityForm.Designer.cs
文件 15039 2007-12-01 16:40 第1章 小区物业管理系统\MyCommunity\MyCommunity\CommunityForm.resx
............此处省略147个文件信息
- 上一篇:asp.net在线健身房管理系统
- 下一篇:VS2012 C#车站售票管理系统数据库
相关资源
- VS2012 C#车站售票管理系统数据库
- asp.net在线健身房管理系统
- 基于C#的学生信息管理系统——有管理
- 强烈推荐:完整的C#源代码之 库存管
- 强烈推荐:完整的C#源代码之 固定资
- c#人事工资管理系统源代码
- 基于ASP.NET的宿舍管理系统
- 学生成绩管理系统(c# 毕业设计 课程
- ASP.Net课程设计考试管理系统
- 基于ASP.NET学生作业管理系统(含论文
- 教务管理系统(毕业设计)源码
- 书店管理系统 asp.net mvc论文+源码
- 超市管理系统(C#源码) 超市管理系
- asp.net(c#)开源权限管理系统
- 小区物业管理系统c#
- 人员管理系统源码
- C#学生信息管理系统用VS2008编写的学生
- asp.net学生公寓管理系统
- 人事工资管理系统ASP.NET+SQL server
- winform酒店管理系统
- C#基于CS开发的人力资源管理系统
- 学生管理系统c#课设窗体技术
- 宾馆客房管理信息系统C#课程设计含数
- 图书管理系统文档数据流图、数据流
- 基于C#与SQL开发的图书管理系统VS201
- c#和sqlserver编写的学生信息管理系统
- asp.net+sqlserver小区物业管理系统
- C# 小区物业管理系统 SqlServer
- 部门信息管理系统
- c#小型超市管理系统
评论
共有 条评论