Exemple #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     comtext = "select * from [Wage] where name='" + textBox3.Text.Trim() + "'";
     if (sqlhelper.findname(comtext))
     {
         ds           = sqlhelper.GetDataSet(comtext, "Wage");
         label1.Text  = ds.Tables[0].Rows[0][3].ToString();//将表中的第一行第四列的数据显示在label上
         label2.Text  = ds.Tables[0].Rows[0][4].ToString();
         label3.Text  = ds.Tables[0].Rows[0][5].ToString();
         label4.Text  = ds.Tables[0].Rows[0][6].ToString();
         label5.Text  = ds.Tables[0].Rows[0][7].ToString();
         label6.Text  = ds.Tables[0].Rows[0][8].ToString();
         label7.Text  = ds.Tables[0].Rows[0][9].ToString();
         label18.Text = ds.Tables[0].Rows[0][10].ToString();
         label33.Text = ds.Tables[0].Rows[0][11].ToString();
         label35.Text = ds.Tables[0].Rows[0][12].ToString();
         label36.Text = ds.Tables[0].Rows[0][13].ToString();
         label37.Text = ds.Tables[0].Rows[0][14].ToString();
     }
     else
     {
         MessageBox.Show("请检查员工姓名是否存在!");
         textBox3.Text = "";
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            string name = textBox3.Text.Trim();

            comtext = "select * from [Wage] where name='" + name + "'";
            if (sqlhelper.findname(comtext))
            {
                ds = sqlhelper.GetDataSet(comtext, "Wage");
                bindingSource1.DataSource = ds;
                bindingSource1.DataMember = "Wage";
                textBox2.DataBindings.Add("Text", bindingSource1, "rixin");
                textBox1.DataBindings.Add("Text", bindingSource1, "benxin");
                textBox4.DataBindings.Add("Text", bindingSource1, "jiangjin");
                textBox5.DataBindings.Add("Text", bindingSource1, "jiari");
                textBox6.DataBindings.Add("Text", bindingSource1, "quanqin");
                textBox7.DataBindings.Add("Text", bindingSource1, "jiaban");
                textBox8.DataBindings.Add("Text", bindingSource1, "benqi");
                textBox9.DataBindings.Add("Text", bindingSource1, "fuli");
                textBox10.DataBindings.Add("Text", bindingSource1, "huoshi");
                textBox11.DataBindings.Add("Text", bindingSource1, "suode");
                textBox12.DataBindings.Add("Text", bindingSource1, "jiezhi");
                textBox13.DataBindings.Add("Text", bindingSource1, "shifa");
                MessageBox.Show("请在方框内输入要更改的信息!");
            }
            else
            {
                MessageBox.Show("请检查员工姓名是否存在!");
                textBox3.Text = "";
            }
        }
        private void Personwage_Load(object sender, EventArgs e)
        {
            string name = Land.name;

            comtext = "select * from [Wage] where name='" + name + "' ";

            if (sqlhelper.findname(comtext))
            {
                ds           = sqlhelper.GetDataSet(comtext, "Wage");
                label1.Text  = ds.Tables[0].Rows[0][3].ToString();//将表中的第一行第四列的数据显示在label上
                label2.Text  = ds.Tables[0].Rows[0][4].ToString();
                label3.Text  = ds.Tables[0].Rows[0][5].ToString();
                label4.Text  = ds.Tables[0].Rows[0][6].ToString();
                label5.Text  = ds.Tables[0].Rows[0][7].ToString();
                label6.Text  = ds.Tables[0].Rows[0][8].ToString();
                label7.Text  = ds.Tables[0].Rows[0][9].ToString();
                label18.Text = ds.Tables[0].Rows[0][10].ToString();
                label33.Text = ds.Tables[0].Rows[0][11].ToString();
                label35.Text = ds.Tables[0].Rows[0][12].ToString();
                label36.Text = ds.Tables[0].Rows[0][13].ToString();
                label37.Text = ds.Tables[0].Rows[0][14].ToString();
            }
            else
            {
                MessageBox.Show("请检查员工姓名是否存在!");
            }
        }
 private void Workmanage_Load(object sender, EventArgs e)
 {
     comtext = "select * from [Work] ";
     ds      = sqlhelper.GetDataSet(comtext, "Work");
     dt      = ds.Tables["Work"];
     dataGridView1.DataSource            = dt;
     dataGridView1.Columns[0].HeaderText = "任务名称";
     dataGridView1.Columns[1].HeaderText = "任务内容";
     dataGridView1.Columns[2].HeaderText = "完成者";
     dataGridView1.Columns[3].HeaderText = "任务期限";
 }
Exemple #5
0
        private void Renshi_Load(object sender, EventArgs e)
        {
            comtext = "select * from [Renshi]";

            ds = sqlhelper.GetDataSet(comtext, "Renshi");
            dt = ds.Tables["Renshi"];
            dataGridView1.DataSource            = dt;
            dataGridView1.Columns[0].HeaderText = "人员名称";
            dataGridView1.Columns[1].HeaderText = "人员性别";
            dataGridView1.Columns[2].HeaderText = "所属职务";
            dataGridView1.Columns[3].HeaderText = "所属部门";
        }
Exemple #6
0
        private void Personwork_Load(object sender, EventArgs e)
        {
            string name = Land.name;

            comtext = "select * from [Work] where wanchengzhe='" + name + "' ";
            ds      = sqlhelper.GetDataSet(comtext, "Work");
            dt      = ds.Tables["Work"];
            dataGridView1.DataSource            = dt;
            dataGridView1.Columns[0].HeaderText = "任务名称";
            dataGridView1.Columns[1].HeaderText = "任务内容";
            dataGridView1.Columns[2].HeaderText = "完成者";
            dataGridView1.Columns[3].HeaderText = "任务期限";
        }
 private void button1_Click(object sender, EventArgs e)
 {
     comtext = "select * from [Dept] ";
     ds      = sqlhelper.GetDataSet(comtext, "Dept");
     dt      = ds.Tables["Dept"];
     dataGridView1.DataSource            = dt;
     dataGridView1.Columns[0].HeaderText = "部门编号";
     dataGridView1.Columns[1].HeaderText = "部门名称";
     dataGridView1.Columns[2].HeaderText = "部门级别";
     dataGridView1.Columns[3].HeaderText = "上级部门";
     dataGridView1.Columns[4].HeaderText = "人数上限";
     dataGridView1.Columns[5].HeaderText = "部门描述";
 }
 private void Kaoqin_Load(object sender, EventArgs e)
 {
     comtext = "select * from [Kaoqin] ";
     ds      = sqlhelper.GetDataSet(comtext, "Kaoqin");
     dt      = ds.Tables["Kaoqin"];
     dataGridView1.DataSource            = dt;
     dataGridView1.Columns[0].HeaderText = "考勤编号";
     dataGridView1.Columns[1].HeaderText = "员工姓名";
     dataGridView1.Columns[2].HeaderText = "上午上班时间";
     dataGridView1.Columns[3].HeaderText = "上午下班时间";
     dataGridView1.Columns[4].HeaderText = "下午上班时间";
     dataGridView1.Columns[5].HeaderText = "下午下班时间";
     dataGridView1.Columns[6].HeaderText = "日期";
 }
Exemple #9
0
        private void Usermanage_Load(object sender, EventArgs e)
        {
            comtext = "select * from [user]";

            ds = sqlhelper.GetDataSet(comtext, "user");
            dt = ds.Tables["user"];
            dataGridView1.DataSource            = dt;
            dataGridView1.Columns[0].HeaderText = "用户编号";
            dataGridView1.Columns[1].HeaderText = "用户名";
            dataGridView1.Columns[2].HeaderText = "密码";
            dataGridView1.Columns[3].HeaderText = "用户姓名";
            dataGridView1.Columns[4].HeaderText = "注册时间";
            dataGridView1.Columns[5].HeaderText = "是否管理员";
        }
Exemple #10
0
        private void Leavefand_Load(object sender, EventArgs e)
        {
            string name = Land.name;

            comtext = "select * from [Leave] where name='" + name + "' ";

            ds = sqlhelper.GetDataSet(comtext, "Leave");
            dt = ds.Tables["Leave"];
            dataGridView1.DataSource            = dt;
            dataGridView1.Columns[0].HeaderText = "员工编号";
            dataGridView1.Columns[1].HeaderText = "员工姓名";
            dataGridView1.Columns[2].HeaderText = "开始时间";
            dataGridView1.Columns[3].HeaderText = "结束时间";
            dataGridView1.Columns[4].HeaderText = "是否半天";
            dataGridView1.Columns[5].HeaderText = "请假原因";
            dataGridView1.Columns[6].HeaderText = "请假天数";
            dataGridView1.Columns[7].HeaderText = "所属部门";
        }
Exemple #11
0
        private void button2_Click(object sender, EventArgs e)
        {
            string name = textBox25.Text.Trim();

            comtext = "select * from [Employee] where name='" + name + "'";
            if (sqlhelper.findname(comtext))
            {
                ds = sqlhelper.GetDataSet(comtext, "Employee");
                bindingSource1.DataSource = ds;
                bindingSource1.DataMember = "Employee";
                textBox1.DataBindings.Add("Text", bindingSource1, "id");
                textBox2.DataBindings.Add("Text", bindingSource1, "name");
                textBox3.DataBindings.Add("Text", bindingSource1, "ename");
                comboBox1.DataBindings.Add("Text", bindingSource1, "age");
                comboBox2.DataBindings.Add("Text", bindingSource1, "sex");
                textBox4.DataBindings.Add("Text", bindingSource1, "chusheng");
                textBox5.DataBindings.Add("Text", bindingSource1, "jiguan");
                textBox6.DataBindings.Add("Text", bindingSource1, "xianzhi");
                textBox7.DataBindings.Add("Text", bindingSource1, "tel");
                textBox8.DataBindings.Add("Text", bindingSource1, "hander");
                // textBox9.DataBindings.Add("Text", bindingSource1, "jingongsi");
                textBox10.DataBindings.Add("Text", bindingSource1, "zhengshi");
                textBox11.DataBindings.Add("Text", bindingSource1, "hetong");
                textBox12.DataBindings.Add("Text", bindingSource1, "qixian");
                //textBox13.DataBindings.Add("Text", bindingSource1, "youxiaoqi");
                textBox14.DataBindings.Add("Text", bindingSource1, "zhiwei");
                textBox15.DataBindings.Add("Text", bindingSource1, "suoshu");
                textBox16.DataBindings.Add("Text", bindingSource1, "kong");
                textBox17.DataBindings.Add("Text", bindingSource1, "email");
                textBox18.DataBindings.Add("Text", bindingSource1, "xueli");
                textBox19.DataBindings.Add("Text", bindingSource1, "school");
                textBox20.DataBindings.Add("Text", bindingSource1, "zhuanye");
                textBox21.DataBindings.Add("Text", bindingSource1, "mianmao");
                textBox22.DataBindings.Add("Text", bindingSource1, "hun");
                textBox23.DataBindings.Add("Text", bindingSource1, "work");
                textBox24.DataBindings.Add("Text", bindingSource1, "uj");
                MessageBox.Show("请在方框内输入要更改的信息!");
            }
            else
            {
                MessageBox.Show("请检查员工姓名是否存在!");
                textBox25.Text = "";
            }
        }
Exemple #12
0
        private void Jobmanage_Load(object sender, EventArgs e)
        {
            comtext = "select * from [Job] ";
            ds      = sqlhelper.GetDataSet(comtext, "Job");
            bindingSource1.DataSource       = ds;
            bindingSource1.DataMember       = "Job";
            bindingNavigator1.BindingSource = bindingSource1;

            textBox1.DataBindings.Add("Text", bindingSource1, "id");
            textBox2.DataBindings.Add("Text", bindingSource1, "zhiwei");
            textBox3.DataBindings.Add("Text", bindingSource1, "gongxing");
            textBox4.DataBindings.Add("Text", bindingSource1, "sex");
            textBox5.DataBindings.Add("Text", bindingSource1, "hun");
            textBox6.DataBindings.Add("Text", bindingSource1, "youxiao");
            textBox7.DataBindings.Add("Text", bindingSource1, "zhaopin");
            textBox8.DataBindings.Add("Text", bindingSource1, "xinjin");
            textBox9.DataBindings.Add("Text", bindingSource1, "xueli");
            textBox10.DataBindings.Add("Text", bindingSource1, "zhuanye");
            textBox11.DataBindings.Add("Text", bindingSource1, "linkman");
            richTextBox1.DataBindings.Add("Text", bindingSource1, "zhuanye");
            textBox12.DataBindings.Add("Text", bindingSource1, "name");
            dateTimePicker1.DataBindings.Add("Text", bindingSource1, "time");
        }
        private void Personinformation_Load(object sender, EventArgs e)
        {
            string name = Land.name;

            comtext = "select * from [Employee] where name='" + name + "' ";


            ds = sqlhelper.GetDataSet(comtext, "Employee");
            dt = ds.Tables["Employee"];
            dataGridView1.DataSource             = dt;
            dataGridView1.Columns[0].HeaderText  = "员工编号";
            dataGridView1.Columns[1].HeaderText  = "员工姓名";
            dataGridView1.Columns[2].HeaderText  = "英文名";
            dataGridView1.Columns[3].HeaderText  = "年龄";
            dataGridView1.Columns[4].HeaderText  = "性别";
            dataGridView1.Columns[5].HeaderText  = "出生日期";
            dataGridView1.Columns[6].HeaderText  = "籍贯";
            dataGridView1.Columns[7].HeaderText  = "现居地址";
            dataGridView1.Columns[8].HeaderText  = "电话";
            dataGridView1.Columns[9].HeaderText  = "手机";
            dataGridView1.Columns[10].HeaderText = "进公司时间";
            dataGridView1.Columns[11].HeaderText = "是否正式员工";
            dataGridView1.Columns[12].HeaderText = "合同";
            dataGridView1.Columns[13].HeaderText = "合同期限";
            dataGridView1.Columns[14].HeaderText = "合同有效期时间";
            dataGridView1.Columns[15].HeaderText = "职位";
            dataGridView1.Columns[16].HeaderText = "所属部门";
            dataGridView1.Columns[17].HeaderText = "职位是否空缺";
            dataGridView1.Columns[18].HeaderText = "电子邮箱";
            dataGridView1.Columns[19].HeaderText = "学历";
            dataGridView1.Columns[20].HeaderText = "毕业院校";
            dataGridView1.Columns[21].HeaderText = "专业";
            dataGridView1.Columns[22].HeaderText = "政治面貌";
            dataGridView1.Columns[23].HeaderText = "婚姻状况";
            dataGridView1.Columns[24].HeaderText = "工作经历";
            dataGridView1.Columns[25].HeaderText = "已参加工作时间";
        }
        private void button1_Click(object sender, EventArgs e)  //查询
        {
            string strcond = "";

            if (radioButton1.Checked)
            {
                if (textBox1.Text.Trim() != "")
                {
                    strcond = "id like '%" + textBox1.Text.Trim() + "%'";
                }
                else
                {
                    MessageBox.Show("请输入查询条件");
                    textBox1.Focus();
                    return;
                }
            }
            if (radioButton2.Checked)
            {
                if (textBox2.Text.Trim() != "")
                {
                    strcond = "name like '%" + textBox2.Text.Trim() + "%'";
                }
                else
                {
                    MessageBox.Show("请输入查询条件");
                    textBox2.Focus();
                    return;
                }
            }
            comtext = "select * from [Employee] where " + strcond;

            ds = sqlhelper.GetDataSet(comtext, "Employee");
            dt = ds.Tables["Employee"];
            dataGridView1.DataSource             = dt;
            dataGridView1.Columns[0].HeaderText  = "员工编号";
            dataGridView1.Columns[1].HeaderText  = "员工姓名";
            dataGridView1.Columns[2].HeaderText  = "英文名";
            dataGridView1.Columns[3].HeaderText  = "年龄";
            dataGridView1.Columns[4].HeaderText  = "性别";
            dataGridView1.Columns[5].HeaderText  = "出生日期";
            dataGridView1.Columns[6].HeaderText  = "籍贯";
            dataGridView1.Columns[7].HeaderText  = "现居地址";
            dataGridView1.Columns[8].HeaderText  = "电话";
            dataGridView1.Columns[9].HeaderText  = "手机";
            dataGridView1.Columns[10].HeaderText = "进公司时间";
            dataGridView1.Columns[11].HeaderText = "是否正式员工";
            dataGridView1.Columns[12].HeaderText = "合同";
            dataGridView1.Columns[13].HeaderText = "合同期限";
            dataGridView1.Columns[14].HeaderText = "合同有效期时间";
            dataGridView1.Columns[15].HeaderText = "职位";
            dataGridView1.Columns[16].HeaderText = "所属部门";
            dataGridView1.Columns[17].HeaderText = "职位是否空缺";
            dataGridView1.Columns[18].HeaderText = "电子邮箱";
            dataGridView1.Columns[19].HeaderText = "学历";
            dataGridView1.Columns[20].HeaderText = "毕业院校";
            dataGridView1.Columns[21].HeaderText = "专业";
            dataGridView1.Columns[22].HeaderText = "政治面貌";
            dataGridView1.Columns[23].HeaderText = "婚姻状况";
            dataGridView1.Columns[24].HeaderText = "工作经历";
            dataGridView1.Columns[25].HeaderText = "已参加工作时间";
        }