jflb.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 jflb : Form
    {
        public jflb()
        {
            InitializeComponent();
        }
        DBOperate operate = new DBOperate();//创建数据库操作对象
        private void frmUserPrize_Load(object sender, EventArgs e)
        {
            string getJFstr = //创建SQL字符串
                "select UserID as '员工编号',UserName as '员工姓名',UserDep as '所属部门',UserJF as '奖/罚',UserJFcontent as '奖罚内容',UserJLMoney as '奖励金额',UserFKMoney as '罚款金额',UserJFDate as '奖罚日期',UserCXDate as '撤销日期' from tb_prize";
            operate.BindDataGridView(dataGridView1,getJFstr);//绑定到DataGridView控件
        }

        private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();//关闭窗体
        }

        private void 增加ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ygjf fjmanage = new ygjf();//创建奖罚管理窗体对象
            fjmanage.ShowDialog();//弹出模式对话框
        }

        private void frmUserPrize_Activated(object sender, EventArgs e)
        {
            frmUserPrize_Load(sender, e);//执行窗体Load事件
        }

        private void toolStripTextBox1_TextChanged(object sender, EventArgs e)
        {
            string getJFstr =//创建SQL字符串
                "select UserID as '员工编号',UserName as '员工姓名',UserDep as '所属部门',UserJF as '奖/罚',UserJFcontent as '奖罚内容',UserJLMoney as '奖励金额',UserFKMoney as '罚款金额',UserJFDate as '奖罚日期',UserCXDate as '撤销日期' from tb_prize where UserName like '%"+toolStripTextBox1.Text.Trim()+"%'";
            operate.BindDataGridView(dataGridView1, getJFstr);//绑定到DataGridView控件
        }

        private void 删除ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedCells.Count == 0)
            {
                MessageBox.Show("请选择要删除的信息", "提示",//弹出消息对话框
                    MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;//退出事件
            }
            else
            {
                string id = dataGridView1.SelectedCells[0].Value.ToString();//获取员工编号
                string sql = //创建SQL字符串
                    "delete from tb_prize where UserID='"+id+"'";
后面还有 41 行代码,购买后查看完整代码

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

AI 解读 AI

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

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