yjf.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using GongZi.GongZiClass;
using System.Text.RegularExpressions;
namespace GongZi
{
public partial class yjf : Form
{
public yjf()
{
InitializeComponent();
}
public string Uid;//声明字段
public string Uname;//声明字段
DBOperate operate = new DBOperate();//创建数据库操作对象
private void frmChangePrize_Load(object sender, EventArgs e)
{
if (cbbUserJFType.Text == "奖励")
{
txtFK.Enabled = false;//停用罚款文本框
txtJL.Enabled = true;//启用奖励文本框
}
else
{
txtJL.Enabled = false;//停用奖励文本框
txtFK.Enabled = true;//启用罚款文本框
}
SqlConnection conn = DBConnection.MyConnection();//创建数据库连接对象
conn.Open();//打开数据库连接
SqlCommand cmd = new SqlCommand("select * from tb_employee", conn);//创建数据库命令对象
SqlDataReader sdr = cmd.ExecuteReader();//创建数据读取器
while (sdr.Read())//读取数据
{
cbbUserNum.Items.Add(sdr["employeeID"].ToString());//添加数据项
}
sdr.Close();//关闭数据读取器
conn.Close();//关闭数据库连接
this.Text = "[" + Uname + "]";//设置窗体标题
string sql =//创建SQL字符串
"select * from tb_prize where UserID='" + Uid + "'";
DataSet ds = operate.GetTable(sql);//得到数据集
ds.Dispose();//释放资源
cbbUserNum.Text = ds.Tables[0].Rows[0][1].ToString();//得到员工编号
cbbUserJFType.Text = ds.Tables[0].Rows[0][4].ToString();//得到奖罚信息
txtname.Text = ds.Tables[0].Rows[0][2].ToString();//得到员工姓名
txtdep.Text = ds.Tables[0].Rows[0][3].ToString();//得到员工部门
txtJFcontent.Text = ds.Tables[0].Rows[0][5].ToString();//得到奖罚内容
txtJL.Text = ds.Tables[0].Rows[0][6].ToString();//得到奖励金额
txtFK.Text = ds.Tables[0].Rows[0][7].ToString();//得到罚款金额
txtJFdate.Text = ds.Tables[0].Rows[0][8].ToString();//得到奖罚日期
txtCXDate.Text = ds.Tables[0].Rows[0][9].ToString();//得到撤销日期
}
private void cbbUserJFType_SelectedIndexChanged(object sender, EventArgs e)
后面还有 93 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。