基本信息维护/业主信息/UpdateOwner.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace PropertyManagementSystem
{
    public partial class UpdateOwner : Form
    {
        public UpdateOwner()
        {
            InitializeComponent();
        }

          private DataGridView dv;
          private OwenrInformation oin;

          public UpdateOwner(DataGridView data, OwenrInformation main)
        {
            InitializeComponent();
            dv = data;
            oin = main;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void UpdateOwner_Load(object sender, EventArgs e)
        {
            this.textBox1.Text = dv.SelectedRows[0].Cells["ownerID"].Value.ToString();
            this.textBox2.Text = dv.SelectedRows[0].Cells["roomID"].Value.ToString();
            this.textBox3.Text = dv.SelectedRows[0].Cells["ownerName"].Value.ToString();
            this.textBox4.Text = dv.SelectedRows[0].Cells["contactInformation"].Value.ToString();
            this.textBox5.Text = dv.SelectedRows[0].Cells["PNumber"].Value.ToString();
            this.textBox6.Text = dv.SelectedRows[0].Cells["type"].Value.ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string id = this.textBox1.Text.ToString().Trim();
            string room = this.textBox2.Text.ToString().Trim();
            string name = this.textBox3.Text.ToString().Trim();
            string ction = this.textBox4.Text.ToString().Trim();
            string number = this.textBox5.Text.ToString().Trim();
            string leixing = this.textBox6.Text.ToString().Trim();
            if (id != "" && room != "" && name != "" && ction != "" && number != "" && leixing != "")
            {
                try
                { 
                    string sql = "update Customer set roomID='" + room + "',ownerName='" + name + "',contactInformation='" + ction + "',PNumber='" + number + "',type='" + leixing + "'  where ownerID=" + id + "";
                  
                  
                        bool r = DBHelper.GetExecuteNonQuery(sql);
后面还有 27 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。