人员信息维护/人员管理/UpdateWork.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 UpdateWork : Form
    {
        public UpdateWork()
        {
            InitializeComponent();
        }

          private DataGridView dv;
          private Work ws;

        public UpdateWork(DataGridView data, Work word)
        {
            InitializeComponent();
            dv = data;
            ws = word;
        }

        private void UpdateWork_Load(object sender, EventArgs e)
        {
            this.textBox1.Text = dv.SelectedRows[0].Cells["roomID"].Value.ToString();
            this.textBox2.Text = dv.SelectedRows[0].Cells["name"].Value.ToString();
            this.textBox3.Text = dv.SelectedRows[0].Cells["Yset"].Value.ToString();
            this.textBox4.Text = dv.SelectedRows[0].Cells["IDCard"].Value.ToString();
            this.textBox5.Text = dv.SelectedRows[0].Cells["Birthday"].Value.ToString();
            this.textBox6.Text = dv.SelectedRows[0].Cells["phone"].Value.ToString();
            this.textBox7.Text = dv.SelectedRows[0].Cells["Arrdess"].Value.ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string id = this.textBox1.Text.ToString();
            string xingming = this.textBox2.Text.ToString().Trim();
            string gender = this.textBox3.Text.ToString().Trim();
            string card = this.textBox4.Text.ToString().Trim();
            string data = this.textBox5.Text.ToString().Trim();
            string number = this.textBox6.Text.ToString().Trim();
            string address = this.textBox7.Text.ToString().Trim();
            if (xingming != "" && gender !="" && card !="" && data !="" && number !="" && address !="")
            {
                string sql = "update Jobpreson set  name='" + xingming + "',Yset='" + gender + "',IDCard='" + card + "',Birthday='" + data + "',phone='" + number + "',Arrdess='" + address + "' where roomID='"+id+"'";
               
               
                    try
                    {
                        bool r = DBHelper.GetExecuteNonQuery(sql);
                        if (r)
                        {
                            MessageBox.Show("修改成功!", "提示");
后面还有 24 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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