major.cs
上传用户:zhongfine
上传日期:2022-08-01
资源大小:2860k
文件大小:8k
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using System.Data.SqlClient;
- namespace 人事管理系统
- {
- public partial class major : Form
- {
- public major()
- {
- InitializeComponent();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- if (label10.Text == "普通用户")
- {
- MessageBox.Show("您的权限不够,无法使用该项!");
- //button2.Enabled = false;
-
- }
- else
- {
- employee_add myemployee_add = new employee_add();
- myemployee_add.ShowDialog();
- }
- }
- private void button3_Click(object sender, EventArgs e)
- {
- if (label10.Text == "普通用户")
- {
- MessageBox.Show("您的权限不够,无法使用该项!");
- //button2.Enabled = false;
- }
- else
- {
- PERSONNEL_CHANGE myPERSONNEL_CHANGE = new PERSONNEL_CHANGE();
- myPERSONNEL_CHANGE.ShowDialog();
- }
- }
- private void button4_Click(object sender, EventArgs e)
- {
-
- employee_inf myemployee_inf = new employee_inf();
- myemployee_inf.label3.Text = label10.Text;
- myemployee_inf.label5.Text = label9.Text;
- myemployee_inf.label8.Text = label14.Text;
- myemployee_inf.ShowDialog();
- }
-
- private void button1_Click(object sender, EventArgs e)
- {
- choose mychoose = new choose();
- mychoose.label1.Text = label10.Text;
- mychoose.label2.Text = label9.Text;
- this.Hide();
- mychoose.Show();
-
- }
- private void button5_Click(object sender, EventArgs e)
- {
- if (label10.Text == "普通用户")
- {
- MessageBox.Show("您的权限不够,无法使用该项!");
- //button2.Enabled = false;
- }
- else
- {
- department mydepartment = new department();
- mydepartment.ShowDialog();
- }
- }
- private void button7_Click(object sender, EventArgs e)
- {
- CHANGE_TEXT mychange_text = new CHANGE_TEXT();
- mychange_text.label1.Text = label10.Text;
- mychange_text.ShowDialog();
- }
- private void 注销ToolStripMenuItem1_Click(object sender, EventArgs e)
- {
- this.Hide();
- loading myloading = new loading();
- myloading.Visible = true;
- }
- private void 退出ToolStripMenuItem1_Click(object sender, EventArgs e)
- {
-
- if (DialogResult.OK == MessageBox.Show("确认退出系统吗?","信息提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Information))
- {
- this.HideForm1.Start();
-
- }
- else
- {
- return;
-
- }
- }
- private void 增加ToolStripMenuItem_Click(object sender, EventArgs e)
- {
- if (label10.Text == "普通用户")
- {
- MessageBox.Show("您的权限不够,无法使用该项!");
- //button2.Enabled = false;
- }
- else
- {
- employee_add myemployee_add = new employee_add();
- myemployee_add.ShowDialog();
- }
- }
- private void 员工信息查询修改ToolStripMenuItem1_Click(object sender, EventArgs e)
- {
-
- employee_inf myemployee_inf = new employee_inf();
- myemployee_inf.label3.Text = label10.Text;
- myemployee_inf.label5.Text = label9.Text;
- myemployee_inf.label8.Text = label14.Text;
- myemployee_inf.ShowDialog();
- }
- private void 人事变动ToolStripMenuItem1_Click(object sender, EventArgs e)
- {
- if (label10.Text == "普通用户")
- {
- MessageBox.Show("您的权限不够,无法使用该项!");
- //button2.Enabled = false;
- }
- else
- {
- PERSONNEL_CHANGE myPERSONNEL_CHANGE = new PERSONNEL_CHANGE();
- myPERSONNEL_CHANGE.ShowDialog();
- }
- }
- private void 人事变动记录ToolStripMenuItem_Click(object sender, EventArgs e)
- {
- CHANGE_TEXT mychange_text = new CHANGE_TEXT();
- mychange_text.ShowDialog();
- }
- private void button6_Click(object sender, EventArgs e)
- {
- if (label10.Text == "普通用户")
- {
- MessageBox.Show("您的权限不够,无法使用该项!");
- //button2.Enabled = false;
- }
- else
- {
- job myjob = new job();
- myjob.ShowDialog();
- }
- }
- private void button8_Click(object sender, EventArgs e)
- {
- about myabout = new about();
- myabout.ShowDialog();
- }
- private void 关于软件ToolStripMenuItem_Click(object sender, EventArgs e)
- {
- about myabout = new about();
- myabout.ShowDialog();
- }
- private void 部门管理ToolStripMenuItem1_Click(object sender, EventArgs e)
- {
- if (label10.Text == "普通用户")
- {
- MessageBox.Show("您的权限不够,无法使用该项!");
- //button2.Enabled = false;
- }
- else
- {
- department mydepartment = new department();
- mydepartment.ShowDialog();
- }
- }
- private void 职位管理ToolStripMenuItem1_Click(object sender, EventArgs e)
- {
- if (label10.Text == "普通用户")
- {
- MessageBox.Show("您的权限不够,无法使用该项!");
- //button2.Enabled = false;
- }
- else
- {
- job myjob = new job();
- myjob.ShowDialog();
- }
- }
- private void 员工密码修改ToolStripMenuItem_Click(object sender, EventArgs e)
- {
- passwd_change mypasswd_change = new passwd_change();
- mypasswd_change.label5.Text = label14.Text;
- mypasswd_change.ShowDialog();
- }
- private void major_Load(object sender, EventArgs e)
- {
-
- //timer控件ShowForm1
- this.ShowForm1.Enabled = true; //控件是否激活
- this.ShowForm1.Interval = 50; //Elapsed 事件的频率
- //timer控件HideForm1
- this.HideForm1.Enabled = false;
- this.HideForm1.Interval = 30;
- this.Opacity = 0.0; //设置窗体透明度
- ShowForm1.Start(); //timer控件 ShowForm1开始
- }
- private void ShowForm1_Tick(object sender, EventArgs e)
- {
- if (this.Opacity == 1) //如果窗体透明度达到 1
- {
- this.ShowForm1.Stop();
- }
- else //透明度小于 1
- {
- this.Opacity = this.Opacity + 0.1; //透明度递增
- }
- }
- private void HideForm1_Tick(object sender, EventArgs e)
- {
- this.Opacity = this.Opacity - 0.1; //透明度不等于 0
- if (this.Opacity == 0) //透明度等于 0
- {
-
- this.HideForm1.Stop();
- Application.Exit();
- }
- }
- private void label13_Click(object sender, EventArgs e)
- {
- }
- private void timer1_Tick(object sender, EventArgs e)
- {
- label13.Text = DateTime.Now.ToString();
- }
-
-
- }
- }