• 大小: 2.44MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-03
  • 语言: 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 Telerik.WinControls;

namespace NewAccountManagement
{
    /// 
    /// 用户账户信息修改和删除类。通过用户主窗体的功能选择,创建不同功能的窗体。
    /// 

    public partial class AccountAM : Telerik.WinControls.UI.RadForm
    {

        DESEncryption des = new DESEncryption();
        public delegate void RefreshEventHandler();
        public event RefreshEventHandler eventrefresh;

        public AccountAM(string caption string btnAMOKtext UserAccount useraccount)
        {
            UserAccount ua=new UserAccount();
            ua = useraccount;
            InitializeComponent();
            this.Text = caption;
            this.btnAMOK.Text = btnAMOKtext;
            if (btnAMOKtext == “修改“)
            {           
                txtAccountID.ReadOnly = true;
                txtAccountID.Text = ua.ID.ToString();
                txtAccountName.Text = ua.Name;
                dtpAccountCreateDate.Value = ua.CreateDate;
                txtAccountNumber.Text = ua.Number;
                txtAccountPasswd.Text = ua.Password;
                txtAccountDesc.Text = ua.Description;
            }
        }

        private void btnAMOK_Click(object sender EventArgs e)
        {
            if (!CheckInputNull())
            { RadMessageBox.Show(null “输入信息不能留空!“ “提示信息“); }
            else
            {
                switch (btnAMOK.Text)
                {
                    case “添加“:
                        //添加账户信息的SQL语句
                        string insertsql = “INSERT INTO UserAccount VALUES(“ + txtAccountID.Text + “ ‘“ + txtAccountName.Text + “‘ ‘“ + dtpAccountCreateDate.Value;
                        insertsql += “‘ ‘“ + txtAccountNumber.Text + “‘ ‘“ + des.Encrypt(txtAccountPasswd.Text) + “‘ ‘“ + txtAccountDesc.Text + “‘)“;
                        if (DBHelper.ExcuteSQL(insertsql))
                        { RadMessageBox.Show(null “添加成功!“ “提示信息“); eventrefresh(); }
                        else
                        { RadMessageBox.Show(null “添加失败!“ “提示信息“); }
                        break;
                    case “修改“:
                        //修改账户信息的SQL语句
                        string updatesql = “UPDATE UserAccount SET AccountName=‘“ + txtAccountName.Text + “‘ AccountCreateDate=‘“ + dtpAccountCreateDate.Value;
                        updatesql += “‘ AccountNumber=‘“ + txtAccountNumber.Text + “‘ AccountPassword=‘“ + des.Encrypt(txtAccountPasswd.Text);
                        updatesql += “‘ AccountDescription=‘“ + txtAccountDesc.Text.Trim() + “‘ WHERE AccountID=“ + txtAccountID.Text;
                        if (DBHelper.ExcuteSQL(updatesql))
                        { RadMessageBox.Show(null “修改成功!“ “提示信息“); eventrefresh(); }
                        else
                        { RadMessageBox.Show(nu

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-04-24 08:08  newAccountManagement\
     文件        2548  2011-03-07 10:36  newAccountManagement\51aspx源码必读.txt
     文件       16636  2011-02-25 20:03  newAccountManagement\AccountAM.Designer.cs
     文件        3980  2011-02-25 20:41  newAccountManagement\AccountAM.cs
     文件       13725  2011-02-25 20:03  newAccountManagement\AccountAM.resx
     文件      249856  2013-04-23 13:50  newAccountManagement\AccountData.mdb
     文件       33412  2011-02-25 21:01  newAccountManagement\AccountForm.Designer.cs
     文件        8450  2011-02-25 22:10  newAccountManagement\AccountForm.cs
     文件       10983  2011-02-25 20:43  newAccountManagement\AccountForm.resx
     文件        3546  2011-02-24 19:30  newAccountManagement\AuthenCode.cs
     目录           0  2013-04-23 09:51  newAccountManagement\Backup\
     文件       16636  2011-02-25 20:03  newAccountManagement\Backup\AccountAM.Designer.cs
     文件        3980  2011-02-25 20:41  newAccountManagement\Backup\AccountAM.cs
     文件       13725  2011-02-25 20:03  newAccountManagement\Backup\AccountAM.resx
     文件       33412  2011-02-25 21:01  newAccountManagement\Backup\AccountForm.Designer.cs
     文件        8450  2011-02-25 22:10  newAccountManagement\Backup\AccountForm.cs
     文件       10983  2011-02-25 20:43  newAccountManagement\Backup\AccountForm.resx
     文件        3546  2011-02-24 19:30  newAccountManagement\Backup\AuthenCode.cs
     文件        2199  2011-03-07 10:27  newAccountManagement\Backup\DBHelper.cs
     文件        5069  2011-02-24 19:22  newAccountManagement\Backup\DESEncryption.cs
     文件        1229  2011-02-24 19:58  newAccountManagement\Backup\MD5Encryption.cs
     文件        8587  2011-02-26 13:11  newAccountManagement\Backup\NewAccountManagement.csproj
     文件         526  2011-02-25 22:57  newAccountManagement\Backup\NewAccountManagement.csproj.user
     文件         929  2011-03-07 10:34  newAccountManagement\Backup\NewAccountManagement.sln
     文件       27648  2011-03-07 10:35  newAccountManagement\Backup\NewAccountManagement.suo
     文件        1700  2011-02-25 22:17  newAccountManagement\Backup\NewAccountManagement_TemporaryKey.pfx
     文件         505  2011-02-25 21:29  newAccountManagement\Backup\Program.cs
     目录           0  2013-04-23 09:51  newAccountManagement\Backup\Properties\
     文件        1396  2011-02-24 18:31  newAccountManagement\Backup\Properties\AssemblyInfo.cs
     文件        2890  2011-02-24 18:31  newAccountManagement\Backup\Properties\Resources.Designer.cs
     文件        5612  2011-02-24 18:31  newAccountManagement\Backup\Properties\Resources.resx
............此处省略104个文件信息

评论

共有 条评论