• 大小: 2.83MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-28
  • 语言: C#
  • 标签: 工资管理  C#  SQL2008  

资源简介

使用C# + sql server 2008 实现,包含完整代码以及数据库,还有使用说明文档

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using PMS.PMSClass;
namespace PMS
{
    public partial class frmAddDep : Form
    {
        public frmAddDep()
        {
            InitializeComponent();
        }
        DBOperate operate = new DBOperate();//创建数据操作对象
        private void button2_Click(object sender EventArgs e)
        {
            this.Close();//关闭窗体
        }

        private void button1_Click(object sender EventArgs e)
        {
            if (txtDepName.Text.Trim() == ““)
            {
                MessageBox.Show(“请输入部门名称“ “提示“//弹出消息对话框
                    MessageBoxButtons.OK MessageBoxIcon.Information);
                return;//退出事件
            }
            else
            {
                string str=//创建SQL字符串
                    “select count(*) from tb_department where DepName=‘“+txtDepName.Text.Trim()+“‘“;
                int i=operate.HumanNum(str);//得到记录数量
                if (i > 0)
                {
                    MessageBox.Show(“该部门已经存在“ “提示“//弹出消息对话框
                        MessageBoxButtons.OK MessageBoxIcon.Information);
                    return;//退出事件
                }
                else
                {
                    string Addsql =//创建SQL字符串
                        “insert into tb_department(DepName) values(‘“ + txtDepName.Text.Trim() + “‘)“;
                    if (operate.OperateData(Addsql) > 0)
                    {
                        MessageBox.Show(“添加成功“ “提示“//弹出消息对话框
                            MessageBoxButtons.OK MessageBoxIcon.Information);
                    }
                }
            }
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2015-04-27 19:06  03\
     目录           0  2015-05-16 23:56  03\PMS\
     目录           0  2015-04-27 19:06  03\PMS\PMS\
     目录           0  2015-04-27 19:06  03\PMS\PMS\Backup\
     文件     1864192  2010-08-11 13:44  03\PMS\PMS\Backup\PMS.bak
     文件           1  2010-08-12 13:06  03\PMS\PMS\ClassDiagram1.cd
     目录           0  2015-04-27 19:06  03\PMS\PMS\CrystalReport\
     文件        5246  2012-12-27 09:37  03\PMS\PMS\CrystalReport\UserCheck.cs
     文件       16384  2010-08-14 14:41  03\PMS\PMS\CrystalReport\UserCheck.rpt
     文件        5238  2012-12-27 09:37  03\PMS\PMS\CrystalReport\UserInfo.cs
     文件       16384  2010-08-11 10:45  03\PMS\PMS\CrystalReport\UserInfo.rpt
     文件        5230  2012-12-27 09:37  03\PMS\PMS\CrystalReport\UserPay.cs
     文件       16384  2008-04-11 15:54  03\PMS\PMS\CrystalReport\UserPay.rpt
     文件        5246  2012-12-27 09:37  03\PMS\PMS\CrystalReport\UserPrize.cs
     文件       16384  2010-08-11 10:29  03\PMS\PMS\CrystalReport\UserPrize.rpt
     文件        5270  2012-12-27 09:37  03\PMS\PMS\CrystalReport\UserRedeploy.cs
     文件       16384  2010-08-11 14:41  03\PMS\PMS\CrystalReport\UserRedeploy.rpt
     目录           0  2015-04-27 19:06  03\PMS\PMS\Database\
     文件     3407872  2015-06-10 13:33  03\PMS\PMS\Database\db_PMS_Data.MDF
     文件     1048576  2015-06-10 13:33  03\PMS\PMS\Database\db_PMS_Log.LDF
     文件       20575  2015-05-16 23:40  03\PMS\PMS\PMS.csproj
     文件         957  2012-12-27 09:37  03\PMS\PMS\PMS.csproj.user
     目录           0  2015-04-27 19:06  03\PMS\PMS\PMSClass\
     文件         547  2015-05-16 23:59  03\PMS\PMS\PMSClass\DBConnection.cs
     文件       10126  2010-08-15 09:44  03\PMS\PMS\PMSClass\DBOperate.cs
     目录           0  2015-04-27 19:06  03\PMS\PMS\PMSImage\
     文件       22534  2008-04-03 16:41  03\PMS\PMS\PMSImage\default.jpg
     文件        2862  2008-04-03 11:11  03\PMS\PMS\PMSImage\house.ico
     文件       31177  2008-04-18 14:43  03\PMS\PMS\PMSImage\login.jpg
     文件      104793  2008-04-18 14:21  03\PMS\PMS\PMSImage\main1.jpg
     文件        2862  2008-04-03 11:11  03\PMS\PMS\PMSImage\people.ico
............此处省略185个文件信息

评论

共有 条评论