bmdd.cs

(开头部分) 4KB

这里只显示每个文件的开头 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 bmdd : Form
    {
        public bmdd()
        {
            InitializeComponent();
        }
        DBOperate operate = new DBOperate();//创建数据库操作对象
        private void frmUserRedeploy_Load(object sender, EventArgs e)
        {
            string sql =//创建SQL字符串
                "select UID as '员工编号',UName as '员工姓名',URemoveDate as '调动时间',UOldDep as '原部门',UNewDep as '现部门',UOldJob as '原职务',UNewJob as '现职务',UOldPay as '原工资',UNewPay as '工资调整',UPayExplain as '调动说明' from tb_redeploy";
            operate.BindDataGridView(dataGridView1,sql);//绑定到DataGridView控件
            string num = "select count(*) from tb_redeploy";//创建SQL字符串
            toolStripStatusLabel2.Text = operate.HumanNum(num).ToString();//显示调动人数
        }

        private void toolStripLabel1_Click(object sender, EventArgs e)
        {
            Addu adduserredeploy = new Addu();//创建添加人员调动窗体对象
            adduserredeploy.ShowDialog();//显示模式窗体
        }

        private void frmUserRedeploy_Activated(object sender, EventArgs e)
        {
            string sql = //创建SQL字符串
                "select UID as '员工编号',UName as '员工姓名',URemoveDate as '调动时间',UOldDep as '原部门',UNewDep as '现部门',UOldJob as '原职务',UNewJob as '现职务',UOldPay as '原工资',UNewPay as '工资调整',UPayExplain as '调动说明' from tb_redeploy";
            operate.BindDataGridView(dataGridView1, sql);//绑定到DataGridView控件
            string num =//查找数量
                "select count(*) from tb_redeploy";
            toolStripStatusLabel2.Text = operate.HumanNum(num).ToString();//显示调动信息数量
        }

        private void toolStripLabel3_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedCells.Count > 0)
            {
                string sql =//创建SQL字符串
                    "delete from tb_redeploy where UID='"+dataGridView1.SelectedCells[0].Value.ToString()+"'";
                if (operate.OperateData(sql)>0)
                {
                    MessageBox.Show("删除成功", "提示",//弹出消息对话框
                        MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            else
            {
                MessageBox.Show("请选择要删除的信息","提示",//弹出消息对话框
                    MessageBoxButtons.OK,MessageBoxIcon.Information);
                return;//退出事件
            }
后面还有 51 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。