Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
CHANGE_TEXT.cs
Upload User: zhongfine
Upload Date: 2022-08-01
Package Size: 2860k
Code Size: 3k
Category:
ERP-EIP-OA-Portal
Development Platform:
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 人事管理系统
- {
- public partial class CHANGE_TEXT : Form
- {
- Datacon mydatacon = new Datacon();
- SqlConnection sqlcn = new SqlConnection();
- SqlDataAdapter myadapter = new SqlDataAdapter();
- DataSet mydataset = new DataSet();
- public CHANGE_TEXT()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- sqlcn=mydatacon.getcon();
- sqlcn.Open();
- string cmd = "select CODE as 记录编号, DESCRIPTION as 人事变动信息描述 from [PERSONNEL_CHANGE]";
- myadapter = new SqlDataAdapter(cmd, sqlcn);
- mydataset.Clear();
- myadapter.Fill(mydataset, "PERSONNEL_CHANGE");
- dataGridView1.DataSource = mydataset.Tables["PERSONNEL_CHANGE"];//刷新dataGridView1内人事变更记录的最新数据
- sqlcn.Close();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void CHANGE_TEXT_Load(object sender, EventArgs e)
- {
- sqlcn = mydatacon.getcon();
- sqlcn.Open();
- string cmd = "select CODE as 记录编号, DESCRIPTION as 人事变动信息描述 from [PERSONNEL_CHANGE]";
- myadapter = new SqlDataAdapter(cmd, sqlcn);
- mydataset.Clear();
- myadapter.Fill(mydataset, "PERSONNEL_CHANGE");
- dataGridView1.DataSource = mydataset.Tables["PERSONNEL_CHANGE"];//在窗体加载的同时填充dataGridView1内部门的最新数据
- sqlcn.Close();
- }
- private void button3_Click(object sender, EventArgs e)
- {
- if (label1.Text == "管理员")
- {
- if (DialogResult.OK == MessageBox.Show("确认清空人事变更记录表里面的记录吗?(不可恢复,慎用!)", "信息提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information))
- {
- sqlcn.Open();
- SqlCommand cmd = new SqlCommand("清空人事变动记录表", sqlcn);
- cmd.ExecuteNonQuery();
- cmd.CommandText = "update COUNTER set COUNTER_VAL='0' where CODE='2'";
- cmd.ExecuteNonQuery();
- MessageBox.Show("数据库中所有人事变更信息清空成功!");
- SqlCommand acd = new SqlCommand();
- SqlDataAdapter myadapter = new SqlDataAdapter("select CODE as 记录编号, DESCRIPTION as 人事变动信息描述 from [PERSONNEL_CHANGE]", sqlcn);
- mydataset.Clear();
- myadapter.Fill(mydataset, "PERSONNEL_CHANGE");
- dataGridView1.DataSource = mydataset.Tables["PERSONNEL_CHANGE"];//在窗体加载的同时填充dataGridView1内部门的最新数据
- sqlcn.Close();
- }
- else
- {
- return;
- }
- }
- else
- {
- MessageBox.Show("您的权限不够,无法使用该项!");
- return;
- }
- }
- }
- }