private void btnSelectAnalyze_Click(object sender, EventArgs e) { string workID = ""; try { IAttendanceAnalysis serviceAnalysis = Service_Peripheral_HR.ServerModuleFactory.GetServerModule <IAttendanceAnalysis>(); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() == DialogResult.OK) { if (frm.SelectedNotifyPersonnelInfo.UserType == BillFlowMessage_ReceivedUserType.用户.ToString()) { foreach (PersonnelBasicInfo personnelInfo in frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList) { workID = personnelInfo.工号; serviceAnalysis.Analysis_Main(dtpBeginDate.Value.Date, dtpEndDate.Value.Date, personnelInfo.工号); } MessageDialog.ShowPromptMessage("分析完成"); } } } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message + " 工号:" + workID); } }
private void 提交验证要求ToolStripMenuItem_Click(object sender, EventArgs e) { if (m_lnqFrock.DJZT == "等待验证要求") { bool blflag = false; for (int i = 0; i < m_dtAttached.Rows.Count; i++) { if (m_dtAttached.Rows[i]["AttachedType"].ToString() == "验证") { blflag = true; } } if (!blflag) { MessageDialog.ShowPromptMessage("请添加验证要求并保存后再提交"); return; } MessageDialog.ShowPromptMessage("请选择验证人员"); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() != DialogResult.OK) { return; } List <string> list = new List <string>(); string lst = ""; foreach (PersonnelBasicInfo pbi in frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList) { if (pbi.工号 != null && pbi.工号.Length > 0) { list.Add(pbi.工号); lst += pbi.姓名; } } if (UpdateMessage("等待验证要求")) { m_msgPromulgator.PassFlowMessage(m_lnqFrock.DJH, string.Format("{0} ※※※ 请【{1}】处理", UniversalFunction.GetGoodsMessage(m_lnqFrock.GoodsID), lst), BillFlowMessage_ReceivedUserType.用户, list); RefreshDataGirdView(); PositioningRecord(m_lnqFrock.DJH); } } else { MessageDialog.ShowPromptMessage("请重新确认单据状态"); return; } }
/// <summary> /// 选择短信发送人 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSelectPersonnel_Click(object sender, EventArgs e) { FormSelectPersonnel2 form = new FormSelectPersonnel2(); form.OnCheckSelectedPersonnel += new GlobalObject.DelegateCollection.CheckSelectedPersonnel(CheckSelectedPersonnel); form.ShowDialog(); }
private void btnAdd_Click(object sender, EventArgs e) { GetData(); if (m_lnqRevisedAbolishedBill.BillStatus == "单据已完成") { MessageDialog.ShowPromptMessage("流程状态错误"); return; } MessageDialog.ShowPromptMessage("请选择下一步流程操作人员"); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() != DialogResult.OK) { return; } if (!m_serverRevisedAbolishedBill.AddInfo(m_lnqRevisedAbolishedBill, out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); } else { m_strBillNo = txtBillNo.Text; BillFlowMessage_ReceivedUserType userType = GlobalObject.GeneralFunction.StringConvertToEnum <BillFlowMessage_ReceivedUserType>(frm.SelectedNotifyPersonnelInfo.UserType); List <string> notifyList = new List <string>(); foreach (PersonnelBasicInfo pbi in frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList) { switch (userType) { case BillFlowMessage_ReceivedUserType.用户: notifyList.Add(pbi.工号); break; case BillFlowMessage_ReceivedUserType.角色: notifyList.Add(pbi.角色); break; default: break; } } m_billMessageServer.DestroyMessage(m_lnqRevisedAbolishedBill.BillNo); m_billMessageServer.SendNewFlowMessage(m_lnqRevisedAbolishedBill.BillNo, string.Format("{0}号文件修订废止申请单已提交,请审核", m_lnqRevisedAbolishedBill.BillNo), userType, notifyList); MessageDialog.ShowPromptMessage("提交成功"); this.Close(); } }
private void 添加toolStripButton1_Click(object sender, EventArgs e) { if (txtDirector.Text.Trim() != "") { MessageDialog.ShowPromptMessage("异常信息主管已经审核,不能重复添加"); return; } if (txtDescription.Text.Trim() == "") { MessageDialog.ShowPromptMessage("请填写异常描述"); return; } if (dtpBeginTime.Value > dtpEndTime.Value) { MessageDialog.ShowPromptMessage("异常起始时间不能大于截止时间"); return; } MessageDialog.ShowPromptMessage("开始设置【相关人员】"); UniversalControlLibrary.FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() != DialogResult.OK) { return; } if (frm.SelectedNotifyPersonnelInfo.UserType != BillFlowMessage_ReceivedUserType.用户.ToString()) { return; } List <PersonnelBasicInfo> lstPersonnelInfo = frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList; HR_BatchException batchException = new HR_BatchException(); batchException.BeginTime = dtpBeginTime.Value; batchException.Date = dtpDate.Value; batchException.EndTime = dtpEndTime.Value; batchException.RecordTime = dtpRecordTime.Value; batchException.Recorder = BasicInfo.LoginID; batchException.Description = txtDescription.Text; try { m_batchServer.AddBatchException(batchException, lstPersonnelInfo); MessageDialog.ShowPromptMessage("提交成功"); RefreshDataGridView(); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); } }
private void btnAdd_Click(object sender, EventArgs e) { if (llbProposerDownLoad.Tag == null) { MessageDialog.ShowPromptMessage("请上传申请文件"); return; } GetData(); if (m_lnqReleaseProcess.SDBStatus == "流程已结束") { MessageDialog.ShowPromptMessage("流程状态错误"); return; } MessageDialog.ShowPromptMessage("请选择下一步流程操作人员"); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() != DialogResult.OK) { return; } if (!m_serverReleaseProcess.AddProcess(m_lnqReleaseProcess, out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); } else { m_strSDBNo = txtSDBNo.Text; List <string> list = new List <string>(); foreach (PersonnelBasicInfo pbi in frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList) { if (pbi.工号 != null && pbi.工号.Length > 0) { list.Add(pbi.工号); } } m_billMessageServer.DestroyMessage(m_lnqReleaseProcess.SDBNo); m_billMessageServer.SendNewFlowMessage(m_lnqReleaseProcess.SDBNo, string.Format("【文件编号】:{0} 【文件名】:{1} ※※※ 等待处理", m_lnqReleaseProcess.FileNo, m_lnqReleaseProcess.FileName), BillFlowMessage_ReceivedUserType.用户, list); MessageDialog.ShowPromptMessage("提交成功"); this.Close(); } }
public bool GetNotifyPersonnel() { FlowInfo_NotifyInfo = new NotifyPersonnelInfo(); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() != DialogResult.OK) { return(false); } FlowInfo_NotifyInfo = frm.SelectedNotifyPersonnelInfo; return(true); }
/// <summary> /// 添加人员 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAddPersonnel_Click(object sender, EventArgs e) { if (dtpEnd.Value > dtpBegin.Value) { InitDataGridView(dtpBegin.Value, dtpEnd.Value); //FormSelectPersonnel frm = new FormSelectPersonnel("员工"); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() == DialogResult.OK) { if (frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList != null && frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList.Count > 0) { foreach (var item in frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList) { bool flag = false; string[] rowData = new string[dataGridView1.Columns.Count]; string preLineWorkId = item.工号; for (int i = 0; i < dataGridView1.Rows.Count; i++) { if (dataGridView1.Rows[i].Cells["工号"].Value.ToString() == preLineWorkId) { flag = true; break; } } if (!flag) { rowData[0] = item.工号; rowData[1] = item.姓名; dataGridView1.Rows.Add(rowData); } } } } dataGridView1.Columns[0].Frozen = true; dataGridView1.Columns[1].Frozen = true; } else { MessageDialog.ShowPromptMessage("请设置好排班表的起止时间后再进行此操作"); return; } }
private void btnAudit_Click(object sender, EventArgs e) { GetData(); if (m_lnqReleaseProcess.SDBStatus != "等待审核") { MessageDialog.ShowPromptMessage("流程状态错误"); return; } MessageDialog.ShowPromptMessage("请选择下一步流程操作人员"); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() != DialogResult.OK) { return; } if (!m_serverReleaseProcess.AuditProcess(m_lnqReleaseProcess, out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); } else { List <string> list = new List <string>(); foreach (PersonnelBasicInfo pbi in frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList) { if (pbi.工号 != null && pbi.工号.Length > 0) { list.Add(pbi.工号); } } m_billMessageServer.PassFlowMessage(m_lnqReleaseProcess.SDBNo, string.Format("【文件编号】:{0} 【文件名】:{1} ※※※ 等待处理", m_lnqReleaseProcess.FileNo, m_lnqReleaseProcess.FileName), BillFlowMessage_ReceivedUserType.用户, list); MessageDialog.ShowPromptMessage("审核成功"); this.Close(); } }
private void btnAudit_Click(object sender, EventArgs e) { GetData(); if (m_lnqRevisedAbolishedBill.BillStatus != "等待审核") { MessageDialog.ShowPromptMessage("流程状态错误"); return; } MessageDialog.ShowPromptMessage("请选择下一步流程操作人员"); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() != DialogResult.OK) { return; } if (!m_serverRevisedAbolishedBill.AuditInfo(m_lnqRevisedAbolishedBill, out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); } else { List <string> list = new List <string>(); foreach (PersonnelBasicInfo pbi in frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList) { if (pbi.工号 != null && pbi.工号.Length > 0) { list.Add(pbi.工号); } } m_billMessageServer.PassFlowMessage(m_lnqRevisedAbolishedBill.BillNo, string.Format("{0}号文件发布流程已审核,请批准", m_lnqRevisedAbolishedBill.BillNo), BillFlowMessage_ReceivedUserType.用户, list); MessageDialog.ShowPromptMessage("审核成功"); this.Close(); } }
List <string> GetChoosePepoleList() { List <string> list = new List <string>(); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() != DialogResult.OK) { return(null); } foreach (PersonnelBasicInfo pbi in frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList) { if (pbi.工号 != null && pbi.工号.Length > 0) { list.Add(pbi.工号); } } return(list); }
private void cmd与会人员_SelectedIndexChanged(object sender, EventArgs e) { if (cmd与会人员.SelectedIndex > 0) { if (!dtpkBeginTime.Checked || !dtpkEndTime.Checked) { MessageDialog.ShowPromptMessage("请先确定会议起止时间后再选择与会人员"); cmd与会人员.SelectedIndex = 0; return; } FormSelectPersonnel2 form = new FormSelectPersonnel2(); form.OnCheckSelectedPersonnel += new GlobalObject.DelegateCollection.CheckSelectedPersonnel(CheckSelectedPersonnel); if (form.ShowDialog() == DialogResult.OK) { cmd与会人员.SelectedIndex = 0; } } }
/// <summary> /// 提交单据流程 /// </summary> /// <returns>成功返回True,失败返回False</returns> bool FlowBill() { MessageDialog.ShowPromptMessage("请选择下一步流程需要知会或操作的人员"); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); frm.ShowDialog(); if (frm.ShowDialog() != DialogResult.OK) { return(false); } List <string> lis = new List <string>(); foreach (PersonnelBasicInfo pbi in frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList) { if (pbi.工号 != null && pbi.工号.Length > 0) { lis.Add(pbi.工号); } } string strBillNo = dataGridView1.CurrentRow.Cells["单据号"].Value.ToString(); string strBillStatus = dataGridView1.CurrentRow.Cells["单据状态"].Value.ToString(); if (!m_serverUnProductTesting.FlowBill(strBillNo, out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); return(false); } else { switch (strBillStatus) { case "新建单据": m_billMessageServer.SendNewFlowMessage(strBillNo, string.Format("{0} 号非产品件检验单单已提交,请处理", strBillNo), BillFlowMessage_ReceivedUserType.用户, lis); break; case "等待检验要求": m_billMessageServer.PassFlowMessage(strBillNo, string.Format("{0} 号非产品件检验单单已提交检验要求,请处理", strBillNo), BillFlowMessage_ReceivedUserType.用户, lis); break; case "等待检验": m_billMessageServer.PassFlowMessage(strBillNo, string.Format("{0} 号非产品件检验单单已检验,请处理", strBillNo), BillFlowMessage_ReceivedUserType.用户, lis); break; case "等待验证要求": m_billMessageServer.PassFlowMessage(strBillNo, string.Format("{0} 号非产品件检验单单已提交验证要求,请处理", strBillNo), BillFlowMessage_ReceivedUserType.用户, lis); break; case "等待验证": m_billMessageServer.PassFlowMessage(strBillNo, string.Format("{0} 号非产品件检验单单已验证,请处理", strBillNo), BillFlowMessage_ReceivedUserType.用户, lis); break; case "等待最终判定": m_billMessageServer.EndFlowMessage(strBillNo, string.Format("{0} 号非产品件检验单单已完成", strBillNo), null, lis); break; default: break; } MessageDialog.ShowPromptMessage("操作成功"); RefreshData(); PositioningRecord(strBillNo); return(true); } }
/// <summary> /// 操作流程 /// </summary> /// <param name="dorr">操作流程枚举</param> void OperatorFlow(SystemFileDORRList dorr) { try { m_lnqDORRList.ID = txtFileName.Tag == null ? 0 : Convert.ToInt32(txtFileName.Tag); if ((dorr == SystemFileDORRList.修改 || dorr == SystemFileDORRList.除) && lbGrantPersonnel.Text != BasicInfo.LoginName) { MessageDialog.ShowPromptMessage("不是创建人本人不能操作,请重新核对"); return; } switch (dorr) { case SystemFileDORRList.添加: CheckData(); GetData(); m_serverDORRList.Add(ref m_lnqDORRList); break; case SystemFileDORRList.修改: CheckData(); GetData(); m_serverDORRList.Update(m_lnqDORRList); break; case SystemFileDORRList.除: m_serverDORRList.Delete(m_lnqDORRList.ID); break; case SystemFileDORRList.签收: m_serverDORRList.Sign(m_lnqDORRList.ID); break; case SystemFileDORRList.回收: m_serverDORRList.Recover(m_lnqDORRList.ID); break; default: break; } MessageDialog.ShowPromptMessage(dorr.ToString() + "成功"); if (dorr == SystemFileDORRList.修改 || dorr == SystemFileDORRList.添加) { MessageDialog.ShowPromptMessage("请指定签收人"); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() != DialogResult.OK) { return; } foreach (PersonnelBasicInfo pbi in frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList) { if (pbi.工号 != null && pbi.工号.Length > 0) { m_listPersonnel.Add(pbi.工号); } } } } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); } RefreshData(); PositioningRecord(m_lnqDORRList.ID.ToString()); }
void OperationBusiness() { string type = GetMode(panel2); string mode = GetMode(panel3); if (type.Trim().Length == 0 || mode.Trim().Length == 0) { MessageDialog.ShowPromptMessage("请选择【单据类型】、【操作类型】"); return; } CE_HR_AttendanceExceptionType billType = GlobalObject.GeneralFunction.StringConvertToEnum <CE_HR_AttendanceExceptionType>(type); CE_OperatorMode operationMode = GlobalObject.GeneralFunction.StringConvertToEnum <CE_OperatorMode>(mode); if (!CheckData()) { return; } List <object> lstInfo = new List <object>(); List <PersonnelBasicInfo> lstPersonnel = new List <PersonnelBasicInfo>(); lstInfo.Add(ServerTime.ConvertToDateTime(dtp_BeginTime.Value)); lstInfo.Add(ServerTime.ConvertToDateTime(dtp_EndTime.Value)); lstInfo.Add(cmb_BusinessType.Text); lstInfo.Add(txtContent.Text.Trim()); lstInfo.Add(num_Hours.Value); if (operationMode == CE_OperatorMode.添加) { lstInfo.Add(null); MessageDialog.ShowPromptMessage(string.Format("请设置需要【{0}】的人员", billType.ToString())); FormSelectPersonnel2 frm = new FormSelectPersonnel2(); if (frm.ShowDialog() != DialogResult.OK) { return; } else { if (frm.SelectedNotifyPersonnelInfo.UserType != BillFlowMessage_ReceivedUserType.用户.ToString()) { MessageDialog.ShowPromptMessage("请选择【用户】"); return; } else { lstPersonnel = frm.SelectedNotifyPersonnelInfo.PersonnelBasicInfoList; } } _serviceAnalysis.Operation_Exception(billType, operationMode, lstInfo, lstPersonnel); } else if (operationMode == CE_OperatorMode.修改) { lstInfo.Add((int)customDataGridView1.CurrentRow.Cells["单据号"].Value); if (MessageDialog.ShowEnquiryMessage("你确定要【" + operationMode.ToString() + "】?") == DialogResult.No) { return; } _serviceAnalysis.Operation_Exception(billType, operationMode, lstInfo, lstPersonnel); } else if (operationMode == CE_OperatorMode.除) { if (MessageDialog.ShowEnquiryMessage("你确定要【" + operationMode.ToString() + "】?") == DialogResult.No) { return; } if (customDataGridView1.SelectedRows.Count == 0) { MessageDialog.ShowPromptMessage("请选择需要【删除】的记录"); return; } foreach (DataGridViewRow dgvr in customDataGridView1.SelectedRows) { lstInfo.Add((int)dgvr.Cells["单据号"].Value); lstPersonnel = new List <PersonnelBasicInfo>(); PersonnelBasicInfo personnel = new PersonnelBasicInfo(); personnel.工号 = dgvr.Cells["执行人"].Value.ToString(); lstPersonnel.Add(personnel); _serviceAnalysis.Operation_Exception(billType, operationMode, lstInfo, lstPersonnel); } } MessageDialog.ShowPromptMessage(string.Format("【{0}单{1}成功】", billType.ToString(), operationMode.ToString())); RefreshDataGridView(); }