91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 1.98MB
    文件類型: .7z
    金幣: 1
    下載: 0 次
    發布日期: 2023-10-12
  • 語言: C#
  • 標簽: c#??源碼??

資源簡介

小區物業管理系統(c#源碼)Visual C# 2005 +Access,內附數據庫。

資源截圖

代碼片段和文件信息

//文件名: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????????{
?????????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.

評論

共有 條評論