⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmemployeeremoveopen.cs

📁 中小企业人力资源管理系统
💻 CS
字号:
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;

namespace HRP.Personnel
{
    public partial class frmEmployeeRemoveOpen : Form
    {
        public frmEmployeeRemoveOpen()
        {
            InitializeComponent();
        }
        public string strUserName;
        public frmEmplpyeeRemove frmemplpyeeremove;
        BaseClass.SqlClass sqlclass = new HRP.BaseClass.SqlClass();
        private void frmEmployeeRemove_Load(object sender, EventArgs e)
        {
            this.Bind();
        }
        public void Bind()
        {
            this.dgvPersonelManage.AutoGenerateColumns = false;
            this.dgvPersonelManage.DataSource = sqlclass.SqlDaAd("select * from tb_Personnel", "tb_Personnel").Tables["tb_Personnel"];
        }

        private void dgvPersonnelManage_MouseClick(object sender, MouseEventArgs e)
        {
            string strid = Convert.ToString(dgvPersonelManage[0, dgvPersonelManage.CurrentCell.RowIndex].Value);
            if (strid != "")
            {
                this.txtEmployeeID.Text = Convert.ToString(dgvPersonelManage[0, dgvPersonelManage.CurrentCell.RowIndex].Value);
                this.txtEmployeeName.Text = Convert.ToString(dgvPersonelManage[1, dgvPersonelManage.CurrentCell.RowIndex].Value);
                this.txtEmployeeWorkType.Text = Convert.ToString(dgvPersonelManage[21, dgvPersonelManage.CurrentCell.RowIndex].Value);
                this.txtEmployeeDept.Text = Convert.ToString(dgvPersonelManage[20, dgvPersonelManage.CurrentCell.RowIndex].Value);
                this.txtEmployeeDutyType.Text = Convert.ToString(dgvPersonelManage[22, dgvPersonelManage.CurrentCell.RowIndex].Value);
                this.txtEmployeePostTitle.Text = Convert.ToString(dgvPersonelManage[23, dgvPersonelManage.CurrentCell.RowIndex].Value);
            }
        }

        private void dgvPersonelManage_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            frmemplpyeeremove.txtEmployeeID.Text = Convert.ToString(dgvPersonelManage[0, dgvPersonelManage.CurrentCell.RowIndex].Value);
            frmemplpyeeremove.txtEmployeeName.Text = Convert.ToString(dgvPersonelManage[1, dgvPersonelManage.CurrentCell.RowIndex].Value);
            frmemplpyeeremove.strWorkType = Convert.ToString(dgvPersonelManage[21, dgvPersonelManage.CurrentCell.RowIndex].Value);
            frmemplpyeeremove.strDept= Convert.ToString(dgvPersonelManage[20, dgvPersonelManage.CurrentCell.RowIndex].Value);
            frmemplpyeeremove.strDuteType= Convert.ToString(dgvPersonelManage[22, dgvPersonelManage.CurrentCell.RowIndex].Value);
            frmemplpyeeremove.strPostTitle= Convert.ToString(dgvPersonelManage[23, dgvPersonelManage.CurrentCell.RowIndex].Value);
            this.Close();
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -