• 大小: 1.66MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-21
  • 语言: C#
  • 标签: C#  管理系统  

资源简介

C#编写的超市管理系统 C#编写的超市管理系统 C#编写的超市管理系统 C#编写的超市管理系统 C#编写的超市管理系统

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace SupermaketManagement
{
    public partial class AddProduct : Form
    {

        private SQLExecuter sqle;
        private int bclassid=-1;
        private int sclassid=-2;
        private string ConnectionString;
        public AddProduct(string str)
        {
            ConnectionString = str;
            sqle = new SQLExecuter(ConnectionString);
            InitializeComponent();
            
        }

        private void button1_Click(object sender EventArgs e)
        {
            
        }
        private void comboBox2_SelectedIndexChanged(object sender EventArgs e)
        {
            if (comboBox2.SelectedItem.ToString() != “请选择大类“)
            {
                comboBox1.Enabled = true;
                sqle.setSQL(“select name from smallclass where bclassid=‘“ + comboBox2.SelectedIndex + “‘ order by id“);
                SqlDataReader r = sqle.ReturnTable();
                comboBox1.Items.Clear();
                bclassid = comboBox2.SelectedIndex-1;
                while (r.Read())
                {
                    comboBox1.Items.Add(r[0].ToString());
                }
            }
        }

        private void comboBox1_SelectedIndexChanged(object sender EventArgs e)
        {
            if (comboBox1.SelectedItem.ToString() != “请选择小类“)
            {
                string temp = comboBox1.SelectedItem.ToString();
                sqle.setSQL(“select id from smallclass where name=‘“ + comboBox1.SelectedItem.ToString ()+ “‘“);
                SqlDataReader r =sqle.ReturnTable();
                r.Read();

                sclassid = Convert.ToInt16(r[0]);
            }
        }

        private void Form4_Load(object sender EventArgs e)
        {
            sqle.setSQL(“select name from bigclass order by id“);
            SqlDataReader r = sqle.ReturnTable();
            comboBox1.SelectedIndex = comboBox2.SelectedIndex = 0;
            comboBox1.DropDownstyle = comboBox2.DropDownstyle = ComboBoxstyle.DropDownList;
            while (r.Read())
            {
                comboBox2.Items.Add(r[0].ToString());
            }
        }

        private void button1_Click_1(object sender EventArgs e)
        {
            if (sclassid != -2 && textBox1.Text != ““ && textBox2.Text != ““ && textBox3.Text != ““ && textBox4.Text != ““)
            {
                sqle.setSQL(“select count(*) from product where name=‘“ + textBox1.Text + “‘“);
                int num = sqle.ReturnNum(true);
                string sql;
                if (num != 1)
                {
                    sql = string.Format(“insert into product values(‘{0}‘‘{1}‘{2}{3}{4}{5})“textBox1.TexttextBox4.TexttextBox2.TexttextBox3.TexttextBox5.Textsclassid);
 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4804  2010-01-07 16:26  SupermaketManagement - 副本\SupermaketManagement\AddProduct.cs

     文件      13455  2010-01-02 14:10  SupermaketManagement - 副本\SupermaketManagement\AddProduct.Designer.cs

     文件       7102  2010-01-02 14:10  SupermaketManagement - 副本\SupermaketManagement\AddProduct.resx

     文件       3981  2010-01-03 14:59  SupermaketManagement - 副本\SupermaketManagement\AdminForm.cs

     文件      10065  2010-01-03 14:59  SupermaketManagement - 副本\SupermaketManagement\AdminForm.Designer.cs

     文件     107586  2010-01-03 14:59  SupermaketManagement - 副本\SupermaketManagement\AdminForm.resx

     文件       3707  2010-01-07 16:23  SupermaketManagement - 副本\SupermaketManagement\Alert.cs

     文件       8082  2010-01-07 16:23  SupermaketManagement - 副本\SupermaketManagement\Alert.Designer.cs

     文件       5814  2010-01-07 16:23  SupermaketManagement - 副本\SupermaketManagement\Alert.resx

     文件        454  2010-01-02 13:13  SupermaketManagement - 副本\SupermaketManagement\app.config

     文件         81  2010-01-07 16:24  SupermaketManagement - 副本\SupermaketManagement\bin\Debug\setting.ini

     文件     618496  2010-01-07 16:29  SupermaketManagement - 副本\SupermaketManagement\bin\Debug\SupermaketManagement.exe

     文件        454  2010-01-02 13:13  SupermaketManagement - 副本\SupermaketManagement\bin\Debug\SupermaketManagement.exe.config

     文件     290304  2010-01-07 16:29  SupermaketManagement - 副本\SupermaketManagement\bin\Debug\SupermaketManagement.pdb

     文件       5632  2005-11-11 22:25  SupermaketManagement - 副本\SupermaketManagement\bin\Debug\SupermaketManagement.vshost.exe

     文件        454  2010-01-02 13:13  SupermaketManagement - 副本\SupermaketManagement\bin\Debug\SupermaketManagement.vshost.exe.config

     文件       3423  2010-01-02 13:28  SupermaketManagement - 副本\SupermaketManagement\ClassManager.cs

     文件       8158  2010-01-02 14:10  SupermaketManagement - 副本\SupermaketManagement\ClassManager.Designer.cs

     文件       5814  2010-01-02 00:12  SupermaketManagement - 副本\SupermaketManagement\ClassManager.resx

     文件       3535  2010-01-01 23:47  SupermaketManagement - 副本\SupermaketManagement\DataView.cs

     文件       7707  2010-01-02 21:03  SupermaketManagement - 副本\SupermaketManagement\Histroy.cs

     文件      16551  2010-01-02 14:10  SupermaketManagement - 副本\SupermaketManagement\Histroy.Designer.cs

     文件       5814  2010-01-01 20:23  SupermaketManagement - 副本\SupermaketManagement\Histroy.resx

     文件       2735  2010-01-02 22:56  SupermaketManagement - 副本\SupermaketManagement\LoginManager.cs

     文件       6494  2010-01-02 22:56  SupermaketManagement - 副本\SupermaketManagement\LoginManager.Designer.cs

     文件       5814  2010-01-02 22:56  SupermaketManagement - 副本\SupermaketManagement\LoginManager.resx

     文件       4827  2010-01-03 15:04  SupermaketManagement - 副本\SupermaketManagement\MDIParent1.cs

     文件      20225  2010-01-03 14:58  SupermaketManagement - 副本\SupermaketManagement\MDIParent1.Designer.cs

     文件     521806  2010-01-03 14:58  SupermaketManagement - 副本\SupermaketManagement\MDIParent1.resx

     文件        480  2010-01-01 21:42  SupermaketManagement - 副本\SupermaketManagement\myComboBoxItem.cs

............此处省略57个文件信息

评论

共有 条评论