• 大小: 2.43MB
    文件类型: .7z
    金币: 2
    下载: 1 次
    发布日期: 2023-11-14
  • 语言: 数据库
  • 标签: C#  SQL  

资源简介

C#+SQL SERVER耗材管控系统,该系统主板管控耗材入库、出库、退领、档案备份、查询等功能!!

资源截图

代码片段和文件信息

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 System.IO;
using System.Drawing.Imaging;

namespace Consumable_Control_System_V1._00
{
    public partial class Add_NEW_Item : Form
    {
        public Add_NEW_Item()
        {
            InitializeComponent();
        }

        private void Form1_FormClosing(object sender FormClosingEventArgs e)
        {
            System.Environment.Exit(1);
        }

        public String User_Name = String.Empty;
        public int User_Grade = 0;
        private void Add_NEW_Item_Load(object sender EventArgs e)//区域
        {
            String Sql_Str = “SELECT * FROM Equipment_Use_Area“;
            OperationDatabase GetStorageArea = new OperationDatabase(@“SERVER2\SERVER2“ “E_Material_Control“ “sa“ “adminsystem“ Sql_Str);
            if (GetStorageArea.Get_Storage_Area(comboBox1 “Region_For_Use“))
            {
                comboBox1.Focus();
                comboBox1.Enabled = true;
            }
            Option_Windows ss = (Option_Windows)this.Owner;
            User_Name = ss.User_Name;
            User_Grade = ss.User_Grade;
            textBox6.Text = User_Name;
        }

        private void comboBox1_SelectedIndexChanged(object sender EventArgs e)//品版
        {
            if (comboBox1.Text != null && comboBox1.Text != String.Empty)
            {
                comboBox2.Items.Clear();
                String Sql_Str = “SELECT * FROM Trademark_Table“;
                OperationDatabase GetTrademark = new OperationDatabase(@“SERVER2\SERVER2“ “E_Material_Control“ “sa“ “adminsystem“ Sql_Str);
                if (GetTrademark.Get_Storage_Area(comboBox2 “Trademark_Name“))
                { 
                    comboBox1.Enabled = false;
                    comboBox2.Enabled = true;
                    comboBox2.Focus();
                }
                else
                {
                    comboBox1.Focus();
                    comboBox1.SelectAll();
                }
            }
            else
            {
                comboBox1.Focus();
                comboBox1.SelectAll();
            }
        }

        private void comboBox2_SelectedIndexChanged(object sender EventArgs e)//物品名称
        {
            if (comboBox2.Text != null && comboBox2.Text != String.Empty)
            {
                comboBox2.Enabled = false;
                textBox1.Enabled = true;
                textBox1.Focus();
            }
            else
            {
                comboBox2.Focus();
                comboBox2.SelectAll();
            }
        }

        private void textBox1_KeyPress(object sender KeyPressEventArgs e)//物品名称
        {
            if (e.KeyChar == (Char)Keys.Enter)
            {
                if (text

评论

共有 条评论