资源简介

C# C/S小区物业管理系统。怒舔毕业设计的人下吧,

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace myCommunity
{
    public partial class AddBuilding : Form
    {
        private SqlConnection conn;
        private SqlCommand cmd;
        baseClass.SqlConnn sqlconn = new myCommunity.baseClass.SqlConnn();
        public AddBuilding()
        {
            InitializeComponent();
        }

        private void txtNumber_KeyPress(object sender KeyPressEventArgs e)
        {
            e.Handled = true;
            if (e.KeyChar >= 48 && e.KeyChar <= 57 || e.KeyChar == 8 || e.KeyChar == 46)
            {
                e.Handled = false;
            }
        }

        private void btnSubmit_Click(object sender EventArgs e)
        {
            if ((this.txtHouseName.Text.Trim()).Length <= 3)
            {
                MessageBox.Show(“请填写正确楼栋名称!“ “温馨提示!“);
            }
            else
            {

                string strsql = “insert into buildingInfo values(@houseName@houseLocation@houseCell@floorsInfo@totalNo@inNo@leftNo@linkPhone@mobilePhone@addInfo)“;
                conn = sqlconn.SqlConn();
                cmd = new SqlCommand(strsql conn);
                cmd.Parameters.AddWithValue(“@houseName“ txtHouseName.Text);
                cmd.Parameters.AddWithValue(“@houseLocation“ txtHouseLocation.Text);
                cmd.Parameters.AddWithValue(“@houseCell“ txtHouseCell.Text);
                cmd.Parameters.AddWithValue(“@floorsInfo“ txtFloorsInfo.Text);
                cmd.Parameters.AddWithValue(“@totalNo“ txtTotalNo.Text);
                cmd.Parameters.AddWithValue(“@inNo“ txtInNo.Text);
                cmd.Parameters.AddWithValue(“@leftNo“ txtLeftNo.Text);
                cmd.Parameters.AddWithValue(“@linkPhone“ txtlinkPhone.Text);
                cmd.Parameters.AddWithValue(“@mobilePhone“ txtMobilePhone.Text);
                cmd.Parameters.AddWithValue(“@addInfo“ txtAddInfo.Text);
                try
                {
                    conn.Open();
                    cmd.ExecuteNonQuery();
                    MessageBox.Show(“添加成功!“);
                }
                catch (Exception ex)
                {

                    MessageBox.Show(ex.ToString());
                }
                finally
                {
                    conn.Dispose();
                    conn.Close();
                }
            }
        }

        private void btnBack_Click(object sender EventArgs e)
        {
            this.Dispose();
            this.Close();
        }

        private void btnReset_Click(object sender EventArgs e)
        {
            txtAddInfo.Text = ““;
            txtFloorsInfo.Text = ““;
            txtHouseCell.Text = ““;
            txtHouseLocation.Text = ““;
            txtHouseName.Text = ““

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3242  2009-05-31 18:24  myCommunity\myCommunity\AddBuilding.cs

     文件      17755  2009-05-16 21:49  myCommunity\myCommunity\AddBuilding.Designer.cs

     文件       7546  2009-05-16 21:49  myCommunity\myCommunity\AddBuilding.resx

     文件       4057  2009-05-18 23:45  myCommunity\myCommunity\AddCarPos.cs

     文件      15045  2009-05-16 21:20  myCommunity\myCommunity\AddCarPos.Designer.cs

     文件       5814  2009-05-16 21:20  myCommunity\myCommunity\AddCarPos.resx

     文件       3758  2009-06-03 10:59  myCommunity\myCommunity\AddComplaint.cs

     文件      15701  2009-06-03 10:59  myCommunity\myCommunity\AddComplaint.Designer.cs

     文件       5814  2009-06-03 10:59  myCommunity\myCommunity\AddComplaint.resx

     文件       4545  2009-06-04 19:46  myCommunity\myCommunity\AddMoveOutFrm.cs

     文件      11621  2009-05-16 21:33  myCommunity\myCommunity\AddMoveOutFrm.Designer.cs

     文件       5814  2009-05-16 21:33  myCommunity\myCommunity\AddMoveOutFrm.resx

     文件       4066  2009-06-03 14:38  myCommunity\myCommunity\AddOtherAmountFrm.cs

     文件      16547  2009-06-03 14:02  myCommunity\myCommunity\AddOtherAmountFrm.Designer.cs

     文件       5814  2009-06-03 14:31  myCommunity\myCommunity\AddOtherAmountFrm.resx

     文件       5482  2009-06-04 19:37  myCommunity\myCommunity\AddOwnersInfoFrm.cs

     文件      23812  2009-05-16 21:48  myCommunity\myCommunity\AddOwnersInfoFrm.Designer.cs

     文件       5814  2009-05-16 21:48  myCommunity\myCommunity\AddOwnersInfoFrm.resx

     文件       3734  2009-06-04 19:53  myCommunity\myCommunity\AddProperty.cs

     文件      14221  2009-06-04 19:53  myCommunity\myCommunity\AddProperty.Designer.cs

     文件       7366  2009-06-04 19:53  myCommunity\myCommunity\AddProperty.resx

     文件       4383  2009-05-20 21:55  myCommunity\myCommunity\AddRepair.cs

     文件      34710  2009-05-20 21:55  myCommunity\myCommunity\AddRepair.Designer.cs

     文件       5814  2009-05-20 21:55  myCommunity\myCommunity\AddRepair.resx

     文件       4232  2009-06-04 19:32  myCommunity\myCommunity\AddUser.cs

     文件      12090  2009-06-04 00:47  myCommunity\myCommunity\AddUser.Designer.cs

     文件       5814  2009-06-04 00:47  myCommunity\myCommunity\AddUser.resx

     文件       8465  2009-06-04 14:13  myCommunity\myCommunity\advSearchFrm.cs

     文件      18519  2009-06-04 14:13  myCommunity\myCommunity\advSearchFrm.Designer.cs

     文件      50322  2009-06-04 14:13  myCommunity\myCommunity\advSearchFrm.resx

............此处省略150个文件信息

评论

共有 条评论