当前库存查询.cs

来自「用C#实现超市的管理」· CS 代码 · 共 51 行

CS
51
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Yewucheng;
namespace Myproject
{
    public partial class 当前库存查询 : Form
    { 
        
       
        public 当前库存查询()
        {
          
            InitializeComponent();
        }

        private void button9_Click(object sender, EventArgs e)
        {
            this.Hide();
        }

        private void 当前库存查询_Load(object sender, EventArgs e)
        {
             wang selectm = new wang();
            DataSet ds = selectm.SelectMand("select *from NewTianjsp");
            this.dbgpaner.DataSource = ds.Tables[0].DefaultView;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            wang chazhao = new wang();

            if (this.txt1.Text == "")
            {
                MessageBox.Show("你输入的商品编号是空号", "系统消息");
            }

            else
            {
                DataSet ds = chazhao.SelectMand("select *from NewTianjsp where 商品编号='" + this.txt1.Text + "'");
                this.dbgpaner.DataSource = ds.Tables[0].DefaultView;
            
            }
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?