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

📄 formempinfo.cs

📁 数据库开发与实例(1+1混合数据库开发实例丛书)人事管理系统的源代码
💻 CS
📖 第 1 页 / 共 5 页
字号:
                                this.dataGrid1.Rows[i].DefaultCellStyle.BackColor = System.Drawing.Color.Pink;
                                i += 2;
                            }
                        }
                        break;
                    }
                #endregion

                #region  员工的来源的是人才市场
                case "人才市场":
                    {
                        string SqlText = "select distinct EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,EmployInfo.eSex as 性别,RaceInfo.rName as 民族,EmployInfo.eMarriage as 婚否,";
                        SqlText += "EmployInfo.eParty as 党派,EmployInfo.eBirth as 出生日期,EmployInfo.eNumber as 身份证号,EmployInfo.ePlace as 籍贯,EmployInfo.ePhone as 联系电话,EmployInfo.eAddress as 联系地址,";
                        SqlText += "EmployInfo.eEdu as 学历,EmployInfo.ePro as 专业,EmployInfo.eDegree as 学位,EmployInfo.eSchool as 毕业学校,EmployInfo.eDate as 毕业时间,";
                        SqlText += "EmployInfo.eEmpTime as 聘用时间,EmployInfo.eEmpType as 聘用方式,EmployInfo.eEmpDataSource as 聘用来源,EmployInfo.eApp as 员工状态,";
                        SqlText += "SectionInfo.sName as 所在部门,JobInfo.JName as 所任职务,Title.tName as 所获职称,EndowmentInfo.endId,EndowmentInfo.enId as 养老保险号,";
                        SqlText += "MedicalInfo.meId,MedicalInfo.mId as 医疗保险号,WagesInfo.waId,WagesInfo.Id as 工资号 ";
                        SqlText += "from EmployInfo,RaceInfo,SectionInfo,JobInfo,Title,EndowmentInfo,MedicalInfo,WagesInfo ";
                        SqlText += "where EmployInfo.rId=RaceInfo.rId and EmployInfo.sId=SectionInfo.sId and JobInfo.jId=EmployInfo.jId and Title.tId=EmployInfo.tId and ";
                        SqlText += "EndowmentInfo.endId=EmployInfo.endId and MedicalInfo.meId=EmployInfo.meId and WagesInfo.waId=EmployInfo.waId and EmployInfo.eEmpDataSource='" + "人才市场'";
                        DataAccess DA = new DataAccess();  
                        this.table = DA.ExeSQLdt(SqlText);
                        this.dataGrid1.DataSource = table.DefaultView;
                        this.cm = (CurrencyManager)this.BindingContext[this.table];
                        if (this.dataGrid1.Rows.Count != 0)
                        {
                            for (int i = 0; i < this.dataGrid1.Rows.Count; )
                            {
                                this.dataGrid1.Rows[i].DefaultCellStyle.BackColor = System.Drawing.Color.Pink;
                                i += 2;
                            }
                        }
                        break;
                    }
                #endregion

                #region  员工的来源是猎头公司
                case "猎头公司":
                    {
                        string SqlText = "select distinct EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,EmployInfo.eSex as 性别,RaceInfo.rName as 民族,EmployInfo.eMarriage as 婚否,";
                        SqlText += "EmployInfo.eParty as 党派,EmployInfo.eBirth as 出生日期,EmployInfo.eNumber as 身份证号,EmployInfo.ePlace as 籍贯,EmployInfo.ePhone as 联系电话,EmployInfo.eAddress as 联系地址,";
                        SqlText += "EmployInfo.eEdu as 学历,EmployInfo.ePro as 专业,EmployInfo.eDegree as 学位,EmployInfo.eSchool as 毕业学校,EmployInfo.eDate as 毕业时间,";
                        SqlText += "EmployInfo.eEmpTime as 聘用时间,EmployInfo.eEmpType as 聘用方式,EmployInfo.eEmpDataSource as 聘用来源,EmployInfo.eApp as 员工状态,";
                        SqlText += "SectionInfo.sName as 所在部门,JobInfo.JName as 所任职务,Title.tName as 所获职称,EndowmentInfo.endId,EndowmentInfo.enId as 养老保险号,";
                        SqlText += "MedicalInfo.meId,MedicalInfo.mId as 医疗保险号,WagesInfo.waId,WagesInfo.Id as 工资号 ";
                        SqlText += "from EmployInfo,RaceInfo,SectionInfo,JobInfo,Title,EndowmentInfo,MedicalInfo,WagesInfo ";
                        SqlText += "where EmployInfo.rId=RaceInfo.rId and EmployInfo.sId=SectionInfo.sId and JobInfo.jId=EmployInfo.jId and Title.tId=EmployInfo.tId and ";
                        SqlText += "EndowmentInfo.endId=EmployInfo.endId and MedicalInfo.meId=EmployInfo.meId and WagesInfo.waId=EmployInfo.waId and EmployInfo.eEmpDataSource='" + "猎头公司'";
                        DataAccess DA = new DataAccess(); 
                        this.table = DA.ExeSQLdt(SqlText);
                        this.dataGrid1.DataSource = table.DefaultView;
                        this.cm = (CurrencyManager)this.BindingContext[this.table];
                        if (this.dataGrid1.Rows.Count != 0)
                        {
                            for (int i = 0; i < this.dataGrid1.Rows.Count; )
                            {
                                this.dataGrid1.Rows[i].DefaultCellStyle.BackColor = System.Drawing.Color.Pink;
                                i += 2;
                            }
                        }
                        break;
                    }
                #endregion

                #region  员工的来源是学校推荐
                case "学校推荐":
                    {
                        string SqlText = "select distinct EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,EmployInfo.eSex as 性别,RaceInfo.rName as 民族,EmployInfo.eMarriage as 婚否,";
                        SqlText += "EmployInfo.eParty as 党派,EmployInfo.eBirth as 出生日期,EmployInfo.eNumber as 身份证号,EmployInfo.ePlace as 籍贯,EmployInfo.ePhone as 联系电话,EmployInfo.eAddress as 联系地址,";
                        SqlText += "EmployInfo.eEdu as 学历,EmployInfo.ePro as 专业,EmployInfo.eDegree as 学位,EmployInfo.eSchool as 毕业学校,EmployInfo.eDate as 毕业时间,";
                        SqlText += "EmployInfo.eEmpTime as 聘用时间,EmployInfo.eEmpType as 聘用方式,EmployInfo.eEmpDataSource as 聘用来源,EmployInfo.eApp as 员工状态,";
                        SqlText += "SectionInfo.sName as 所在部门,JobInfo.JName as 所任职务,Title.tName as 所获职称,EndowmentInfo.endId,EndowmentInfo.enId as 养老保险号,";
                        SqlText += "MedicalInfo.meId,MedicalInfo.mId as 医疗保险号,WagesInfo.waId,WagesInfo.Id as 工资号 ";
                        SqlText += "from EmployInfo,RaceInfo,SectionInfo,JobInfo,Title,EndowmentInfo,MedicalInfo,WagesInfo ";
                        SqlText += "where EmployInfo.rId=RaceInfo.rId and EmployInfo.sId=SectionInfo.sId and JobInfo.jId=EmployInfo.jId and Title.tId=EmployInfo.tId and ";
                        SqlText += "EndowmentInfo.endId=EmployInfo.endId and MedicalInfo.meId=EmployInfo.meId and WagesInfo.waId=EmployInfo.waId and EmployInfo.eEmpDataSource='" + "学校推荐'";
                        DataAccess DA = new DataAccess();   
                        this.table = DA.ExeSQLdt(SqlText);
                        this.dataGrid1.DataSource = table.DefaultView;
                        this.cm = (CurrencyManager)this.BindingContext[this.table];
                        if (this.dataGrid1.Rows.Count != 0)
                        {
                            for (int i = 0; i < this.dataGrid1.Rows.Count; )
                            {
                                this.dataGrid1.Rows[i].DefaultCellStyle.BackColor = System.Drawing.Color.Pink;
                                i += 2;
                            }
                        }
                        break;
                    }
                #endregion

                #region  员工状态是在职
                case "在职":
                    {
                        string SqlText = "select distinct EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,EmployInfo.eSex as 性别,RaceInfo.rName as 民族,EmployInfo.eMarriage as 婚否,";
                        SqlText += "EmployInfo.eParty as 党派,EmployInfo.eBirth as 出生日期,EmployInfo.eNumber as 身份证号,EmployInfo.ePlace as 籍贯,EmployInfo.ePhone as 联系电话,EmployInfo.eAddress as 联系地址,";
                        SqlText += "EmployInfo.eEdu as 学历,EmployInfo.ePro as 专业,EmployInfo.eDegree as 学位,EmployInfo.eSchool as 毕业学校,EmployInfo.eDate as 毕业时间,";
                        SqlText += "EmployInfo.eEmpTime as 聘用时间,EmployInfo.eEmpType as 聘用方式,EmployInfo.eEmpDataSource as 聘用来源,EmployInfo.eApp as 员工状态,";
                        SqlText += "SectionInfo.sName as 所在部门,JobInfo.JName as 所任职务,Title.tName as 所获职称,EndowmentInfo.endId,EndowmentInfo.enId as 养老保险号,";
                        SqlText += "MedicalInfo.meId,MedicalInfo.mId as 医疗保险号,WagesInfo.waId,WagesInfo.Id as 工资号 ";
                        SqlText += "from EmployInfo,RaceInfo,SectionInfo,JobInfo,Title,EndowmentInfo,MedicalInfo,WagesInfo ";
                        SqlText += "where EmployInfo.rId=RaceInfo.rId and EmployInfo.sId=SectionInfo.sId and JobInfo.jId=EmployInfo.jId and Title.tId=EmployInfo.tId and ";
                        SqlText += "EndowmentInfo.endId=EmployInfo.endId and MedicalInfo.meId=EmployInfo.meId and WagesInfo.waId=EmployInfo.waId and EmployInfo.eApp='" + "在职'";
                        
                        DataAccess DA = new DataAccess();   
                        this.table = DA.ExeSQLdt(SqlText);
                        this.dataGrid1.DataSource = table.DefaultView;
                        this.cm = (CurrencyManager)this.BindingContext[this.table];
                        if (this.dataGrid1.Rows.Count != 0)
                        {
                            for (int i = 0; i < this.dataGrid1.Rows.Count; )
                            {
                                this.dataGrid1.Rows[i].DefaultCellStyle.BackColor = System.Drawing.Color.Pink;
                                i += 2;
                            }
                        }
                        break;
                    }
                #endregion

                #region  员工状态是离职
                case "离职":
                    {
                        string SqlText = "select distinct EmployInfo.eId as 员工编号,EmployInfo.eName as 员工姓名,EmployInfo.eSex as 性别,RaceInfo.rName as 民族,EmployInfo.eMarriage as 婚否,";
                        SqlText += "EmployInfo.eParty as 党派,EmployInfo.eBirth as 出生日期,EmployInfo.eNumber as 身份证号,EmployInfo.ePlace as 籍贯,EmployInfo.ePhone as 联系电话,EmployInfo.eAddress as 联系地址,";
                        SqlText += "EmployInfo.eEdu as 学历,EmployInfo.ePro as 专业,EmployInfo.eDegree as 学位,EmployInfo.eSchool as 毕业学校,EmployInfo.eDate as 毕业时间,";
                        SqlText += "EmployInfo.eEmpTime as 聘用时间,EmployInfo.eEmpType as 聘用方式,EmployInfo.eEmpDataSource as 聘用来源,EmployInfo.eApp as 员工状态,";
                        SqlText += "SectionInfo.sName as 所在部门,JobInfo.JName as 所任职务,Title.tName as 所获职称,EndowmentInfo.endId,EndowmentInfo.enId as 养老保险号,";
                        SqlText += "MedicalInfo.meId,MedicalInfo.mId as 医疗保险号,WagesInfo.waId,WagesInfo.Id as 工资号 ";
                        SqlText += "from EmployInfo,RaceInfo,SectionInfo,JobInfo,Title,EndowmentInfo,MedicalInfo,WagesInfo ";
                        SqlText += "where EmployInfo.rId=RaceInfo.rId and EmployInfo.sId=SectionInfo.sId and JobInfo.jId=EmployInfo.jId and Title.tId=EmployInfo.tId and ";
                        SqlText += "EndowmentInfo.endId=EmployInfo.endId and MedicalInfo.meId=EmployInfo.meId and WagesInfo.waId=EmployInfo.waId and EmployInfo.eApp='" + "离职'";
                        DataAccess DA = new DataAccess();  
                        this.table = DA.ExeSQLdt(SqlText);
                        this.dataGrid1.DataSource = table.DefaultView;
                        this.cm = (CurrencyManager)this.BindingContext[this.table];
                        if (this.dataGrid1.Rows.Count != 0)
                        {
                            for (int i = 0; i < this.dataGrid1.Rows.Count; )
                            {
                                this.dataGrid1.Rows[i].DefaultCellStyle.BackColor = System.Drawing.Color.Pink;
                                i += 2;
                            }
                        }
                        break;
                    }
                #endregion 
            }
        }
       

        //取消查询
        private void button2_Click(object sender, EventArgs e)
        {
            this.groupBox1.Visible = false;
            this.dataGrid1.Height = 424;
            this.dataGrid1.Dock = DockStyle.Right;
            this.DBDataGrid();
        }

        //查询
        private void button1_Click(o

⌨️ 快捷键说明

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