rykqgl.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using GongZi.GongZiClass;
namespace GongZi
{
public partial class rykqgl : Form
{
public rykqgl()
{
InitializeComponent();
}
DBOperate operate = new DBOperate();//创建数据库操作对象
private void frmUserCheck_Load(object sender, EventArgs e)
{
string str =//创建SQL字符串
"select PID as '员工编号',Pname as '员工姓名',Pdep as '所属部门',PKpcontent as '考评内容',PKpResult as '考评结果',PKpscore as '考评分数',PKpPeople as '考评人',PKpDate as '考评日期' from tb_check";
operate.BindDataGridView(dataGridView1,str);//绑定到DataGridView控件
string num = "select count(*) from tb_check";//查找数量信息
toolStripStatusLabel2.Text = operate.HumanNum(num).ToString();//显示考评记录数量
}
private void toolStripLabel1_Click(object sender, EventArgs e)
{
Adduc addusercheck = new Adduc();//创建人员考评窗体对象
addusercheck.ShowDialog();//显示模式窗体
}
private void frmUserCheck_Activated(object sender, EventArgs e)
{
string str =//创建SQL字符串对象
"select PID as '员工编号',Pname as '员工姓名',Pdep as '所属部门',PKpcontent as '考评内容',PKpResult as '考评结果',PKpscore as '考评分数',PKpPeople as '考评人',PKpDate as '考评日期' from tb_check";
operate.BindDataGridView(dataGridView1, str);//绑定到DataGridView控件
string num = "select count(*) from tb_check";//创建SQL字符串对象
toolStripStatusLabel2.Text = operate.HumanNum(num).ToString();//显示考评记录数量信息
}
private void toolStripLabel3_Click(object sender, EventArgs e)
{
if (dataGridView1.SelectedCells.Count > 0)
{
string id = dataGridView1.SelectedCells[0].Value.ToString();//得到ID信息
string deletesql = "delete from tb_check where PID='"+id+"'";//创建SQL字符串
if (operate.OperateData(deletesql) > 0)
{
MessageBox.Show("删除成功", "提示",//弹出消息对话框
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
else
{
MessageBox.Show("请选择要删除的信息","提示",//弹出消息对话框
MessageBoxButtons.OK,MessageBoxIcon.Information);
return;//退出事件
}
}
后面还有 60 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。