private void 确认分析判定结果ToolStripMenuItem_Click(object sender, EventArgs e) { if (dataGridView1.CurrentRow.Cells["单据状态"].Value.ToString() == "等待分析判定确认") { if (!UpdateBill()) { return; } string msg = string.Format("{0} 号质量问题整改处置单已分析判定确认完毕,请责任部门领导指定责任人", m_lnqQuality.Bill_ID); IQueryable <View_HR_Personnel> IQViewPersonnel = m_serverPersonnel.GetDeptDirector(m_serverDepartment.GetDepartmentCode(m_lnqQuality.RelevantDepartment)); List <string> lisStr = new List <string>(); foreach (View_HR_Personnel item in IQViewPersonnel) { lisStr.Add(item.工号); } m_billMessageServer.PassFlowMessage(m_lnqQuality.Bill_ID, msg, BillFlowMessage_ReceivedUserType.用户, lisStr); } else { MessageDialog.ShowErrorMessage("请重新确认单据状态"); } }
public 新品开发计划表(string billID) { InitializeComponent(); m_billMessageServer.BillType = "质量问题整改处置单"; ClearMessage(); m_lnqNewProductDevelopment = m_serverQualityProblem.GetNewProductDevelopmentMessage(billID); lbBill_ID.Text = m_lnqNewProductDevelopment.Bill_ID; SetMessage(); if (lbPlanProducer.Text != "") { string strDepartment = m_serverDepartment.GetDeptInfoFromPersonnelInfo(lbPlanProducer.Text).Rows[0]["DepartmentCode"].ToString(); IQueryable <View_HR_Personnel> iqList = m_serverPersonnel.GetDeptDirector(strDepartment); foreach (var item in iqList) { if (item.工号 == BasicInfo.LoginID) { btnAuditing.Visible = true; toolStripSeparator2.Visible = true; } } } }
public 搭车分析计划表(string billID) { InitializeComponent(); m_billMessageServer.BillType = CE_BillTypeEnum.质量问题整改处置单.ToString(); ClearMessage(); m_lnqAssemblingAnalysis = m_serverQualityProblem.GetAssemblingAnalysisMessage(billID); lbBill_ID.Text = m_lnqAssemblingAnalysis.Bill_ID; SetMessage(); if (lbPlanProducer.Text != "") { string strDepartment = m_serverDepartment.GetDeptInfoFromPersonnelInfo(lbPlanProducer.Text).Rows[0]["DepartmentCode"].ToString(); IQueryable <View_HR_Personnel> iqList = m_serverPersonnel.GetDeptDirector(strDepartment); foreach (var item in iqList) { if (item.工号 == BasicInfo.LoginID) { btnAuditing.Visible = true; toolStripSeparator2.Visible = true; } } } if (txtPrincipal.Text == BasicInfo.LoginName) { btnSaveAnalysisResult.Visible = true; toolStripSeparator4.Visible = true; } if (lbAnalysisPersonnel.Text != "") { string strDepartment = m_serverDepartment.GetDeptInfoFromPersonnelInfo(lbAnalysisPersonnel.Text).Rows[0]["DepartmentCode"].ToString(); IQueryable <View_HR_Personnel> iqList = m_serverPersonnel.GetDeptDirector(strDepartment); foreach (var item in iqList) { if (item.工号 == BasicInfo.LoginID) { btnAuditingAnalysisResult.Visible = true; toolStripSeparator3.Visible = true; } } } }
/// <summary> /// 刷新控件 /// </summary> void RefreshControl() { ClearControl(); if (SelectedNode == null || SelectedNode.Tag == null || SelectedNode.Tag.ToString() == "system") { return; } View_Department dept = SelectedNode.Tag as View_Department; txtCode.Text = dept.部门代码; txtName.Text = dept.部门名称; // 获取部门负责人 cmbDeptType.Text = dept.部门类型; if (dept.电话 != null) { txtTelephone.Text = dept.电话; } if (dept.真 != null) { txtFax.Text = dept.真; } if (dept.备注 != null) { txtRemark.Text = dept.备注; } IQueryable <View_HR_Personnel> directorGroup = m_personnelServer.GetDeptDirector(dept.部门代码); if (directorGroup != null && directorGroup.Count() > 0) { foreach (var item in directorGroup) { cmbPrincipal.Items.Add(item.姓名); } cmbPrincipal.SelectedIndex = 0; cmbPrincipal.Tag = directorGroup.ToList(); } }