⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 销售添加.cs

📁 用C#实现超市的管理
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Yewucheng;
namespace Myproject
{
    public partial class 销售添加 : Form
    {
        private 销售管理 info;
        public 销售添加(销售管理 obj)
        {
            InitializeComponent();
            this.info = obj;
            
        }

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

            if (this.txt1.Text == "")
            {
                MessageBox.Show("商品编号不能为空!");
            }
            else
            {
                MessageBox.Show("添加成功!", "系统消息");
            }

            xiaoshou.insertmand("insert into NewTianjsp values('" + this.txt2.Text + "','" + this.combox4.Text + "','" + this.txt3.Text + "','" + this.comboBox3.Text + "'," + this.txt9.Text + "," + this.txt4.Text + "," + this.txt5.Text + ",'" + this.txt1.Text + "','" + this.txt8.Text + "')");
          this.Hide();

            DataSet ds=xiaoshou.SelectMand("select *from NewTianjsp");
            this.info.dbgname2.DataSource = ds.Tables[0].DefaultView;

        }

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

⌨️ 快捷键说明

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