• 大小: 20.09MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-17
  • 语言: 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.OleDb;
using VWMS.CommonClass;

namespace VWMS
{
    public partial class frmLogin : Form
    {
        public frmLogin()
        {
            InitializeComponent();
        }

        DataCon datacon = new DataCon();
        DataOperate dataoperate = new DataOperate();

        private void btnLogin_Click(object sender EventArgs e)
        {
            if (txtName.Text == ““)
            {
                errorProName.SetError(txtName “用户名不能为空!“);
            }
            else
            {
                errorProName.Clear();
                string strSql = “select * from tb_admin where name=‘“ + txtName.Text + “‘ and pwd=‘“ + txtPwd.Text + “‘“;
                DataSet ds = dataoperate.getDs(strSql “tb_admin“);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    this.Hide();
                    frmMain frmmain = new frmMain();
                    frmmain.Show();
                }
                else
                {
                    MessageBox.Show(“用户名或密码错误!“ “警告“ MessageBoxButtons.OK MessageBoxIcon.Warning);
                }
            }
        }

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

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

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

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

     文件     637952  2008-11-29 13:46  源程序\01\readme.doc

     文件        704  2008-11-29 13:48  源程序\01\VWMS\Backup\VWMS\CommonClass\DataCon.cs

     文件        909  2008-11-29 13:48  源程序\01\VWMS\Backup\VWMS\CommonClass\DataOperate.cs

     文件       5505  2008-11-29 13:48  源程序\01\VWMS\Backup\VWMS\CommonClass\PelcoD.cs

     文件       3536  2008-11-29 13:48  源程序\01\VWMS\Backup\VWMS\CommonClass\SoftReg.cs

     文件       8483  2008-11-29 13:48  源程序\01\VWMS\Backup\VWMS\CommonClass\VideoOperate.cs

     文件       1976  2008-11-29 13:46  源程序\01\VWMS\Backup\VWMS\frmLogin.cs

     文件       4896  2008-11-29 13:46  源程序\01\VWMS\Backup\VWMS\frmLogin.Designer.cs

     文件     279244  2008-11-29 13:47  源程序\01\VWMS\Backup\VWMS\frmLogin.resx

     文件      16417  2008-11-29 13:47  源程序\01\VWMS\Backup\VWMS\frmMain.cs

     文件      23066  2008-11-29 13:46  源程序\01\VWMS\Backup\VWMS\frmMain.Designer.cs

     文件    5012835  2008-11-29 13:49  源程序\01\VWMS\Backup\VWMS\frmMain.resx

     文件       1035  2008-11-29 13:47  源程序\01\VWMS\Backup\VWMS\frmPlay.cs

     文件       4523  2008-11-29 13:47  源程序\01\VWMS\Backup\VWMS\frmPlay.Designer.cs

     文件      12463  2008-11-29 13:47  源程序\01\VWMS\Backup\VWMS\frmPlay.resx

     文件       1568  2008-11-29 13:47  源程序\01\VWMS\Backup\VWMS\frmRegister.cs

     文件       4272  2008-11-29 13:47  源程序\01\VWMS\Backup\VWMS\frmRegister.Designer.cs

     文件     180015  2008-11-29 13:47  源程序\01\VWMS\Backup\VWMS\frmRegister.resx

     文件       3218  2008-11-29 13:47  源程序\01\VWMS\Backup\VWMS\frmSetMonitor.cs

     文件       6394  2008-11-29 13:47  源程序\01\VWMS\Backup\VWMS\frmSetMonitor.Designer.cs

     文件     398622  2008-11-29 13:48  源程序\01\VWMS\Backup\VWMS\frmSetMonitor.resx

     文件        466  2008-11-29 13:46  源程序\01\VWMS\Backup\VWMS\Program.cs

     文件       1156  2008-11-29 13:49  源程序\01\VWMS\Backup\VWMS\Properties\AssemblyInfo.cs

     文件       2862  2008-11-29 13:49  源程序\01\VWMS\Backup\VWMS\Properties\Resources.Designer.cs

     文件       5612  2008-11-29 13:49  源程序\01\VWMS\Backup\VWMS\Properties\Resources.resx

     文件       1087  2008-11-29 13:49  源程序\01\VWMS\Backup\VWMS\Properties\Settings.Designer.cs

     文件        249  2008-11-29 13:49  源程序\01\VWMS\Backup\VWMS\Properties\Settings.settings

     文件       6103  2008-11-29 13:46  源程序\01\VWMS\Backup\VWMS\VWMS.csproj

     文件        168  2008-11-29 13:46  源程序\01\VWMS\Backup\VWMS\VWMS.csproj.user

     文件        901  2008-11-29 13:46  源程序\01\VWMS\Backup\VWMS.sln

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

评论

共有 条评论