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

资源简介

库存管理系统 C# 实现,希望对你们有用!

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace SMS
{
    public partial class frmLogin : Form
    {
        public static string M_str_name;        //记录登录用户名字
        public static string M_str_pwd;         //记录登录用户密码
        public static string M_str_right;       //记录登录用户的权限
        baseClass.DataCon datacon = new SMS.baseClass.DataCon();
        baseClass.DataOperate doperate = new SMS.baseClass.DataOperate();
        public frmLogin()
        {
            InitializeComponent();
        }
 
        private void frmLogin_Load(object sender EventArgs e)
        {
            doperate.cboxBind(“select UserName from tb_User“ “tb_User“ “UserName“ cboxUName);
        }

        private void btnLogin_Click(object sender EventArgs e)
        {
            int P_int_returnValue = doperate.UserLogin(cboxUName.Text.Trim() txtPwd.Text.Trim());
            if (P_int_returnValue == 100)
            {
                M_str_name = cboxUName.Text;
                M_str_pwd = txtPwd.Text.Trim();
                frmMain fmain = new frmMain();
                this.Hide();
                fmain.Show();
            }
            if (P_int_returnValue == -100)
            {
                MessageBox.Show(“用户名或密码错误!“ “提示“ MessageBoxButtons.OK MessageBoxIcon.Information);
                txtPwd.Text = ““;
                cboxUName.Focus();
            } 
        }

        private void btnExit_Click(object sender EventArgs e)
        {
            Application.Exit();
        }

        private void cboxUName_SelectedIndexChanged(object sender EventArgs e)
        {
            SqlDataReader sqlread = datacon.getread(“select UserNameUserRight from tb_User where UserName=‘“ + cboxUName.Text + “‘“);
            if (sqlread.Read())
            {
                labURight.Text = sqlread[“UserRight“].ToString();
                M_str_right = labURight.Text;
            }
            sqlread.Close();
        }

        private void frmLogin_FormClosing(object sender FormClosingEventArgs e)
        {
            Application.Exit();
        }

        private void txtPwd_KeyPress(object sender KeyPressEventArgs e)
        {
            if (e.KeyChar == 13)
                btnLogin.Focus();
        }

        private void cboxUName_KeyPress(object sender KeyPressEventArgs e)
        {
            if (e.KeyChar == 13)
                txtPwd.Focus();
        }
    }
}

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

    ......R      2413  2008-08-29 13:17  21\SMS\SMS\baseClass\DataCon.cs

    ......R     21882  2008-08-29 13:13  21\SMS\SMS\baseClass\DataOperate.cs

    ......R     16614  2008-08-29 13:08  21\SMS\SMS\BasicInfo\frmGoodsInfo.Designer.cs

    ......R      4317  2008-08-29 13:17  21\SMS\SMS\BasicInfo\frmGoodsInfo.cs

    ......R      8546  2008-08-29 13:08  21\SMS\SMS\BasicInfo\frmGoodsInfo.resx

    ......R     14426  2008-08-29 13:08  21\SMS\SMS\BasicInfo\frmPrInfo.Designer.cs

    ......R      5807  2008-08-29 13:17  21\SMS\SMS\BasicInfo\frmPrInfo.cs

    ......R      9355  2008-08-29 13:08  21\SMS\SMS\BasicInfo\frmPrInfo.resx

    ......R     14019  2008-08-29 13:08  21\SMS\SMS\BasicInfo\frmStoreInfo.Designer.cs

    ......R      5462  2008-08-29 13:17  21\SMS\SMS\BasicInfo\frmStoreInfo.cs

    ......R      9156  2008-08-29 13:08  21\SMS\SMS\BasicInfo\frmStoreInfo.resx

    ......R   1376256  2008-11-12 11:28  21\SMS\SMS\Database\db_SMS_Data.MDF

    ......R   1048576  2008-11-12 11:28  21\SMS\SMS\Database\db_SMS_Log.LDF

    ......R     18064  2008-08-29 13:10  21\SMS\SMS\GoodsManage\frmBGManage.Designer.cs

    ......R      6636  2008-08-29 13:17  21\SMS\SMS\GoodsManage\frmBGManage.cs

    ......R      9108  2008-08-29 13:10  21\SMS\SMS\GoodsManage\frmBGManage.resx

    ......R     17949  2008-08-29 13:10  21\SMS\SMS\GoodsManage\frmCKManage.Designer.cs

    ......R      7143  2008-08-29 13:17  21\SMS\SMS\GoodsManage\frmCKManage.cs

    ......R      9155  2008-08-29 13:10  21\SMS\SMS\GoodsManage\frmCKManage.resx

    ......R     19564  2008-08-29 13:10  21\SMS\SMS\GoodsManage\frmISManage.Designer.cs

    ......R      5593  2008-08-29 13:17  21\SMS\SMS\GoodsManage\frmISManage.cs

    ......R      8337  2008-08-29 13:10  21\SMS\SMS\GoodsManage\frmISManage.resx

    ......R     20050  2008-08-29 13:10  21\SMS\SMS\GoodsManage\frmOSManage.Designer.cs

    ......R      7006  2008-08-29 13:17  21\SMS\SMS\GoodsManage\frmOSManage.cs

    ......R      8337  2008-08-29 13:10  21\SMS\SMS\GoodsManage\frmOSManage.resx

    ......R     18143  2008-08-29 13:10  21\SMS\SMS\GoodsManage\frmRGManage.Designer.cs

    ......R      8170  2008-08-29 13:14  21\SMS\SMS\GoodsManage\frmRGManage.cs

    ......R      8956  2008-08-29 13:10  21\SMS\SMS\GoodsManage\frmRGManage.resx

    ......R      4213  2008-08-29 13:11  21\SMS\SMS\Help\frmAboutUs.Designer.cs

    ......R       983  2008-08-29 13:17  21\SMS\SMS\Help\frmAboutUs.cs

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

评论

共有 条评论