开发工具:
文件大小: 1mb
下载次数: 0
上传时间: 2013-06-17
详细说明:
namespace HumanManage { public partial class FrmMain : Form { public static bool CheckFrom = true; public static XmlDocument MydocRoleInfo = new XmlDocument(); public static XmlDocument MydocEmpInfo = new XmlDocument(); private static XmlDocument EmpInfo = new XmlDocument(); private static XmlDocument EmpRewPun = new XmlDocument(); private static XmlDocument EmpRemove = new XmlDocument(); private static XmlDocument EmpAddPay = new XmlDocument(); XmlNodeList ListEmp = MydocEmpInfo.SelectNodes("//新员工"); public static bool End = false; //是否结算 public static string SetId = ""; public static string SetName = ""; public FrmMain() { InitializeComponent(); } private void FrmMain_Load(object sender, EventArgs e) { this.pnlEmpManage.Visible = false; this.pnlShowEmpInfor.Location = new System.Drawing.Point(118, 87); this.pnlShowEmpInfor.Size = new System.Drawing.Size(910, 600); this.tabControl1.Size = new System.Drawing.Size(900, 289); //this.tabControl1.Size = new System.Drawing.Size(900, 296); skinFrmMain.SkinFile = "MSN.ssk"; MydocRoleInfo.Load("..\\..\\LoginMessage.xml"); MydocEmpInfo.Load("..\\..\\xmlAddEmp.xml"); //在下面显示操作者 tsslblEmpName.Text = "[" + FrmLogin.EmpName + "]"; SetId = tsslblEmpName.Text; XmlNodeList ListRole = MydocRoleInfo.SelectNodes("//管理员[@注册号]"); foreach (XmlNode nodes in ListRole) { if (FrmLogin.EmpName == nodes.ChildNodes[1].InnerText) { tsslblRole.Text = nodes.ChildNodes[0].InnerText; SetName = tsslblRole.Text; } } } /// /// 弹出添加员工界面 /// /// /// private void btnAddEmp1_Click(object sender, EventArgs e) { groupSetting.Visible = false; if (CheckFrom == true) { FrmAddEmp frmaddemp = new FrmAddEmp(); frmaddemp.Show(); CheckFrom = false; } } /// /// Listview控件中显示查询到的员工信息的方法 /// /// private void ListviewShow(string SelectText) { ltvSelect.Items.Clear(); foreach (XmlNode Empnode in ListEmp) { if (SelectText != "") { if (Empnode.ChildNodes[0].InnerText.Contains(SelectText)) { ListViewItem items = ltvSelect.Items.Add(Empnode.Attributes["员工编号"].Value); items.SubItems.Add(Empnode.ChildNodes[0].InnerText); items.SubItems.Add(Empnode.ChildNodes[15].InnerText); items.SubItems.Add(Empnode.ChildNodes[18].InnerText); } } } } /// /// 查询 /// /// /// private void btnSelect_Click(object sender, EventArgs e) { ListviewShow(txtSelect1.Text); this.pnlSelectEmp.Visible = true; } private void txtSelect2_TextChanged(object sender, EventArgs e) { ListviewShow(txtSelect2.Text); } /// /// 返回 /// /// /// private void btnBack_Click(object sender, EventArgs e) { txtSelect2.Text = ""; this.pnlSelectEmp.Visible = false; } private void ltvSelect_MouseDown(object sender, MouseEventArgs e) { } #region 显示查找到的员工的信息 /// /// 显示员工信息 /// /// /// private void btnGo_Click(object sender, EventArgs e) { EmpRewPun.Load("..\\..\\xmlRewardsAndPun.xml"); EmpRemove.Load("..\\..\\xmlRemove.xml"); EmpAddPay.Load("..\\..\\xmlRedressalPay.xml"); EmpInfo.Load("..\\..\\xmlAddEmp.xml"); string text = ""; string id = ""; XmlNodeList RewPun = EmpRewPun.SelectNodes("//员工"); XmlNodeList ListEmps = EmpInfo.SelectNodes("//新员工"); foreach (XmlNode Empnode in ListEmps) { //参照MSDN ListView.SelectedListViewItemCollection breakfast = this.ltvSelect.SelectedItems; foreach (ListViewItem item in breakfast) { id = item.SubItems[0].Text; text = item.SubItems[1].Text; } if (txtSelect1.Text == Empnode.ChildNodes[0].InnerText || text == Empnode.ChildNodes[0].InnerText) { lblID2.Text = id; lblName2.Text = Empnode.ChildNodes[0].InnerText; lblSex2.Text = Empnode.ChildNodes[1].InnerText; lblBirthday2.Text = Empnode.ChildNodes[2].InnerText; lblWorkDate.Text = Empnode.ChildNodes[3].InnerText; lblFace2.Text = Empnode.ChildNodes[4].InnerText; lblMarriage2.Text = Empnode.ChildNodes[5].InnerText; lblNation2.Text = Empnode.ChildNodes[6].InnerText; lblPlace2.Text = Empnode.ChildNodes[7].InnerText; lblStudyExper.Text = Empnode.ChildNodes[8].InnerText; lblspecialty.Text = Empnode.ChildNodes[9].InnerText; lblSchool.Text = Empnode.ChildNodes[10].InnerText; lblAddress2.Text = Empnode.ChildNodes[11].InnerText; lblPhone2.Text = Empnode.ChildNodes[12].InnerText; lblEmail2.Text = Empnode.ChildNodes[13].InnerText; lblNameId2.Text = Empnode.ChildNodes[14].InnerText; lblDept.Text = Empnode.ChildNodes[15].InnerText; lblWorkId.Text = Empnode.ChildNodes[16].InnerText; lblPost.Text = Empnode.ChildNodes[17].InnerText; lblJop.Text = Empnode.ChildNodes[18].InnerText; lblPay.Text = Empnode.ChildNodes[19].InnerText; lblStartDate.Text = Empnode.ChildNodes[20].InnerText; lblEndDate.Text = Empnode.ChildNodes[21].InnerText; lblForm.Text = Empnode.ChildNodes[24].InnerText; lblFettle.Text = Empnode.ChildNodes[26].InnerText; txtSelect2.Text = ""; break; } } //显示奖惩纪录 ltvRewPunInfo.Items.Clear(); int i = 0, j = 0; foreach (XmlNode NodeEmps in RewPun) { if (NodeEmps.Attributes["员工编号"].Value.Remove(1) == lblID2.Text) { ListViewItem item = ltvRewPunInfo.Items.Add(NodeEmps.ChildNodes[4].InnerText); item.SubItems.Add(NodeEmps.ChildNodes[6].InnerText); item.SubItems.Add(NodeEmps.ChildNodes[7].InnerText); item.SubItems.Add(NodeEmps.ChildNodes[8].InnerText); i++; j += Convert.ToInt32(NodeEmps.ChildNodes[6].InnerText); } } toolStripAll.Text = i.ToString(); toolStriplblMarks.Text = j.ToString(); //显示调薪纪录 XmlNode AddPay = EmpAddPay.SelectSingleNode("//员工调薪[@员工编号='" + id + "']"); ltvNewPay.Items.Clear(); if (AddPay != null) { ListViewItem Payitem = ltvNewPay.Items.Add(AddPay.ChildNodes[6].InnerText); Payitem.SubItems.Add(AddPay.ChildNodes[4].InnerText); Payitem.SubItems.Add(AddPay.ChildNodes[5].InnerText); Payitem.SubItems.Add(AddPay.ChildNodes[7].InnerText); Payitem.SubItems.Add(AddPay.ChildNodes[8].InnerText); toolStriplblAll.Text = "1"; } else toolStriplblAll.Text = "0"; //显示调动记录 XmlNode AddMove = EmpRemove.SelectSingleNode("//员工调动[@员工编号='" + id + "']"); ltvMove.Items.Clear(); if (AddMove != null) { ListViewItem MoveItem = ltvMove.Items.Add(AddMove.ChildNodes[6].InnerText); MoveItem.SubItems.Add(AddMove.ChildNodes[4].InnerText); MoveItem.SubItems.Add(AddMove.ChildNodes[5].InnerText); MoveItem.SubItems.Add(AddMove.ChildNodes[7].InnerText); MoveItem.SubItems.Add(AddMove.ChildNodes[2].InnerText); MoveItem.SubItems.Add(AddMove.ChildNodes[3].InnerText); MoveItem.SubItems.Add(AddMove.ChildNodes[8].InnerText); toolStripMove.Text = "1"; } else toolStriplblAll.Text = "0"; this.pnlSelectEmp.Visible = false; } #endregion #region 进入签到签离界面 /// /// /// /// /// private void btnGoOrBack_Click(object sender, EventArgs e) { EmpInfor.FrmGoOrBack goback = new global::HumanManage.EmpInfor.FrmGoOrBack(); goback.Show(); } #endregion /// /// 信息统计界面 /// /// /// private void btnInformation_Click(object sender, EventArgs e) { groupSetting.Visible = false; if (CheckFrom == true) { frmInfoStat InfoStat = new frmInfoStat(); InfoStat.Show(); CheckFrom = false; } } /// /// 返回到员工资料界面 /// /// /// private void btnEmpInfor_Click(object sender, EventArgs e) { groupSetting.Visible = false; this.pnlSystemManage.Visible = false; this.pnlPayManage.Visible = false; this.pnlEmpManage.Visible = false; this.pnlShowEmpInfor.Visible = true; } #region 进入人事管理界面 /// /// 人事管理界面 /// /// /// private void btnHumanManage_Click(object sender, EventArgs e) { groupSetting.Visible = false; this.pnlShowEmpInfor.Visible = false; this.pnlPayManage.Visible = false; this.pnlSystemManage.Visible = false; this.pnlEmpManage.Visible = true; this.pnlEmpManage.Location = new System.Drawing.Point(118, 87); this.pnlEmpManage.Size = new System.Drawing.Size(910, 600); } private void btnInfo_Click(object sender, EventArgs e) { if (CheckFrom == true) { FrmEmpInfoManage EmpInfo = new FrmEmpInfoManage(); EmpInfo.Show(); CheckFrom = false; } } private void btnEmpRewAndPun_Click(object sender, EventArgs e) { if (CheckFrom == true) { HumanManage.FrmEmpRewAndPun EmpRewAndPun = new global::HumanManage.HumanManage.FrmEmpRewAndPun(); EmpRewAndPun.Show(); CheckFrom = false; } } private void btnEmpRemove_Click(object sender, EventArgs e) { if (CheckFrom == true) { HumanManage.FrmEmpRemove EmpRemove = new global::HumanManage.HumanManage.FrmEmpRemove(); EmpRemove.Show(); CheckFrom = false; } } private void btnEmpCheckWork_Click(object sender, EventArgs e) { if (CheckFrom == true) { HumanManage.FrmEmpCheckWork EmpCheck = new global::HumanManage.HumanManage.FrmEmpCheckWork(); EmpCheck.Show(); CheckFrom = false; } } private void btnEmpRedressalPay_Click(object sender, EventArgs e) { if (CheckFrom == true) { HumanManage.FrmEmpRedressalPay EmpPay = new global::HumanManage.HumanManage.FrmEmpRedressalPay(); EmpPay.Show(); CheckFrom = false; } } #endregion #region 进入工资管理界面 /// /// 工资管理界面 /// /// /// private void btnPayManage_Click(object sender, EventArgs e) { groupSetting.Visible = false; this.pnlShowEmpInfor.Visible = false; this.pnlSystemManage.Visible = false; this.pnlEmpManage.Visible = false; this.pnlPayManage.Visible = true; this.pnlPayManage.Location = new System.Drawing.Point(118, 87); this.pnlPayManage.Size = new System.Drawing.Size(910, 500); } private void btnPaySetting_Click(object sender, EventArgs e) { if (CheckFrom == true) { PayManage.FrmEmpPay SetPay = new global::HumanManage.PayManage.FrmEmpPay(); SetPay.Show(); CheckFrom = false; } } private void btnPayGive_Click(object sender, EventArgs e) { if (CheckFrom == true) { PayManage.FrmEmpGive givepay = new global::HumanManage.PayManage.FrmEmpGive(); givepay.Show(); CheckFrom = false; } } private void btnPaySelect_Click(object sender, EventArgs e) { if (CheckFrom == true) { PayManage.FrmSelectPay SelPay = new global::HumanManage.PayManage.FrmSelectPay(); SelPay.Show(); CheckFrom = false; } } #endregion #region 进入系统设置界面 /// /// 系统设置界面 /// /// /// private void btnSystemSet_Click(object sender, EventArgs e) { groupSetting.Visible = false; this.pnlShowEmpInfor.Visible = false; this.pnlEmpManage.Visible = false; this.pnlPayManage.Visible = false; this.pnlSystemManage.Visible = true; this.pnlSystemManage.Location = new System.Drawing.Point(118, 87); this.pnlSystemManage.Size = new System.Drawing.Size(910, 500); } private void btnBaseInfo_Click(object sender, EventArgs e) { if (CheckFrom == true) { SystemSet.FrmBasicInfo SetInfor = new global::HumanManage.SystemSet.FrmBasicInfo(); SetInfor.Show(); CheckFrom = false; } } private void bntOperatorManage_Click(object sender, EventArgs e) { if (CheckFrom == true) { SystemSet.FrmOperaterManage Operater = new global::HumanManage.SystemSet.FrmOperaterManage(); Operater.Show(); CheckFrom = false; } } private void btnOperatorLog_Click(object sender, EventArgs e) { } #endregion #region 更换用户 /// /// /// /// /// private void btnChange_Click(object sender, EventArgs e) { groupSetting.Visible = false; FrmLogin Login = new FrmLogin(); Login.ShowDialog(); tsslblEmpName.Text = "[" + FrmLogin.EmpName + "]"; SetId = tsslblEmpName.Text; XmlNodeList ListRole = MydocRoleInfo.SelectNodes("//管理员[@注册号]"); foreach (XmlNode nodes in ListRole) { if (FrmLogin.EmpName == nodes.ChildNodes[1].InnerText) { tsslblRole.Text = nodes.ChildNodes[0].InnerText; SetName = tsslblRole.Text; } } } #endregion /// /// 系统工具 /// /// /// private void btnSeter_Click(object sender, EventArgs e) { groupSetting.Visible = true; } private void btnBook_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("notepad.exe"); groupSetting.Visible = false; } private void btnCal_Click(object sender, EventArgs e) { System.Diagnostics.Process.Start("calc.exe"); groupSetting.Visible = false; } /// /// 编辑资料 /// /// /// private void btnEdit_Click(object sender, EventArgs e) { groupSetting.Visible = false; if (CheckFrom == true && lblID2.Text != "") { FrmEmpInfoManage.ID = lblID2.Text; FrmAddEmp.Save = false; FrmAddEmp Edit = new FrmAddEmp(); Edit.Show(); CheckFrom = false; } } /// /// 退出 /// /// /// private void btnExit_Click(object sender, EventArgs e) { Application.Exit(); } private void FrmMain_FormClosing(object sender, FormClosingEventArgs e) { if (this.DialogResult != DialogResult.OK) { DialogResult result = MessageBox.Show("是否真的退出程序?", "询问", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (result == DialogResult.Cancel) { e.Cancel = true; } } } } } ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.