• 大小: 1.49MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-14
  • 语言: C#
  • 标签: 小区  物业  管理  系统  

资源简介

小区物业管理系统 管理 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个文件信息

评论

共有 条评论