ygjjxx.cs

(开头部分) 7KB

这里只显示每个文件的开头 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;
using System.IO;
namespace GongZi
{
    public partial class ygjjxx : Form
    {
        public ygjjxx()
        {
            InitializeComponent();
        }
        DBOperate operate = new DBOperate();//创建数据库操作对象
        public string YGName;//声明字段
        public string YGID;//声明字段
        private void frmEmployeeInfo_Load(object sender, EventArgs e)
        {
            operate.BindDropdownlist("tb_department", cbbYGBumen, 1);//绑定下拉列表
            operate.BindDropdownlist("tb_userJob", txtYGZhiwu, 1);//绑定所有的职务列表
            this.Text = "[ "+YGName+" ]的个人信息";//设置窗体标题
            string sql =//创建SQL字符串
                "select * from tb_employee where employeeID='" + YGID + "'";
            DataSet ds = operate.GetTable(sql);//得到数据集
            ds.Dispose();//释放资源
            txtYGNum.Text = ds.Tables[0].Rows[0][1].ToString();//获取员工编号信息
            txtYGName.Text = ds.Tables[0].Rows[0][2].ToString();//获取员工姓名信息
            cbbYGSex.SelectedItem = ds.Tables[0].Rows[0][3].ToString();//获取性别信息
            cbbYGBumen.SelectedItem = ds.Tables[0].Rows[0][4].ToString();//获取部门信息
            txtYGBirthday.Text = ds.Tables[0].Rows[0][5].ToString();//获取生日信息
            txtYGminzu.SelectedItem = ds.Tables[0].Rows[0][6].ToString();//获取民族信息
            cbbYGHunyin.SelectedItem = ds.Tables[0].Rows[0][7].ToString();//获取婚姻信息
            txtYGZhiwu.SelectedItem = ds.Tables[0].Rows[0][8].ToString();//获取职务信息
            txtYGPhone.Text = ds.Tables[0].Rows[0][9].ToString();//获取电话信息
            txtYGJiuzhi.Text = ds.Tables[0].Rows[0][10].ToString();//获取就职日期
            txtYGPay.Text = ds.Tables[0].Rows[0][12].ToString();//获取工资信息
          
        }

        private void toolStripLabel2_Click(object sender, EventArgs e)
        {
            try
            {
                string DelSql =//创建数据库连接字符串
                    "delete from tb_employee where employeeID='" + YGID + "'";
                operate.OperateData(DelSql);//删除数据
                operate.DeleUserInfo(YGID);//删除数据
                MessageBox.Show(//弹出消息对话框
                    "删除成功","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
                this.Close();//关闭窗体
            }
            catch
            {
                MessageBox.Show("删除操作失败","提示",//弹出消息对话框
                    MessageBoxButtons.OK,MessageBoxIcon.Information);
            }
后面还有 112 行代码,购买后查看完整代码

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

AI 解读 AI

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

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