财务管理/收费项目维护/Charge_Update.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;
using WindowsFormsApplication1;

namespace PropertyManagementSystem.财务管理.收费项目维护
{
    public partial class Charge_Update : Form
    {
        public Charge_Update()
        {
            InitializeComponent();
        }

        private void Charge_Update_Load(object sender, EventArgs e)
        {
            string sql = "select chargeID,chargeName,unitPrice,chargeType from Charge_Update";
            this.dataGridView1.DataSource = DBHelper.GetDataSet(sql).Tables[0];
        }

        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            Help11 h = new Help11();
            h.ShowDialog();
        }

        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            string id = this.dataGridView1.SelectedRows[0].Cells["chargeID"].Value.ToString();
            try
            {
                    string sql = "delete from Charge_Update where chargeID=" + id;
                    bool r = DBHelper.GetExecuteNonQuery(sql);
                     if (id == "")
                    {
                          MessageBox.Show("当前行没有数据!", "提示", MessageBoxButtons.OK);
                    }
                     else if (r)
                    {
                        MessageBox.Show("删除成功!", "提示");
                        Charge_Update_Load(sender, e);
                    }
            }
            catch (Exception ex)
            {
                MessageBox.Show("加载时发生错误!\n原因:" + ex.Message, "提示");
            }
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            UpAdd u = new UpAdd();
            u.ShowDialog();
        }
后面还有 52 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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