财务管理/收费单维护/MoneyDan.cs

(开头部分) 4KB

这里只显示每个文件的开头 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 PropertyManagementSystem;
using PropertyManagementSystem.财务管理.收费单维护;

namespace WindowsFormsApplication1
{
    public partial class MoneyDan : Form
    {
        public MoneyDan()
        {
            InitializeComponent();
        }

        private void MoneyDan_Load(object sender, EventArgs e)
        {
            string sql = "select * from Charge";
           this.dataGridView1.DataSource= DBHelper.GetDataSet(sql).Tables[0];
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string id= this.textBox1.Text.ToString();
            string name=this.textBox2.Text.ToString();
            string sql = "select ID,chargeID,chargeName,unitPrice,totalPrice,chargeType,owenrName,data from Charge where chargeID like '%" + id + "%' and owenrName like '%"+name+"%'";
            this.dataGridView1.DataSource = DBHelper.GetDataSet(sql).Tables[0];
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            MoneyDAdd md = new MoneyDAdd();
            md.ShowDialog();
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            UpdataMoney uf = new UpdataMoney(this.dataGridView1,this);
            uf.ShowDialog();
        }

        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            string id = this.dataGridView1.SelectedRows[0].Cells["ID"].Value.ToString();
            DialogResult result = MessageBox.Show("您是否要删除本条记录?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question);
            if (id == "")
            {
                MessageBox.Show("当前行没有数据!", "提示", MessageBoxButtons.OK);
            }
            else if (result == DialogResult.Yes)
            {
                try
                {
                    string sql = "delete from Charge where ID=" + id;
后面还有 71 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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