private void 批准通过ToolStripMenuItem_Click(object sender, EventArgs e) { if (lbDJZT.Text == "等待领导批准") { UpdateProductBill("等待领导批准"); #region 发送知会消息 string strNy = cmbYear.Text.Trim() + cmbMonth.Text.Trim(); List <string> noticeRoles = new List <string>(); noticeRoles.Add(CE_RoleEnum.采购账务管理员.ToString()); noticeRoles.Add(CE_RoleEnum.采购主管.ToString()); noticeRoles.Add(CE_RoleEnum.采购分管领导.ToString()); m_msgPromulgator.EndFlowMessage(strNy, string.Format("{0} 号采购计划单已处理完毕", strNy), noticeRoles, null); #endregion } else { MessageDialog.ShowPromptMessage("请重新确认单据状态"); } }
private void 确认通过ToolStripMenuItem_Click(object sender, EventArgs e) { if (txtStatus.Text.Trim() != "等待批准") { MessageDialog.ShowPromptMessage("请重新确认单据状态"); return; } GetMessage(); if (!m_technologyServer.UpdateBill(m_lnqTechnology, (DataTable)dataGridView1.DataSource, out m_error)) { MessageDialog.ShowPromptMessage(m_error); return; } else { MessageDialog.ShowPromptMessage("批准成功!"); #region 发送知会消息 bool flag = false; for (int i = 0; i < dataGridView1.Rows.Count; i++) { if (dataGridView1.Rows[i].Cells["是否修改零件本身"].Value.ToString() == "是") { flag = true; break; } } if (flag) { string msg = string.Format("{0}号技术变更单,请财务复审", txtDJH.Text); m_msgPromulgator.PassFlowMessage(txtDJH.Text, msg, BillFlowMessage_ReceivedUserType.角色, CE_RoleEnum.会计.ToString()); } else { List <string> noticeRoles = new List <string>(); noticeRoles.Add(CE_RoleEnum.零件工程师.ToString()); noticeRoles.Add(CE_RoleEnum.开发部办公室文员.ToString()); noticeRoles.Add(CE_RoleEnum.采购账务管理员.ToString()); m_msgPromulgator.EndFlowMessage(m_lnqTechnology.BillNo, string.Format("{0} 号技术变更单已经处理完毕", m_lnqTechnology.BillNo), noticeRoles, null); } #endregion 发送知会消息 } this.Close(); }
private void 确认单据ToolStripMenuItem_Click(object sender, EventArgs e) { if (lbBillStatus.Text != "等待确认") { MessageDialog.ShowPromptMessage("请重新确认单据状态"); return; } if (FlowBill()) { MessageDialog.ShowPromptMessage("提交成功"); List <string> listRole = new List <string>(); listRole.Add(CE_RoleEnum.设备组长.ToString()); listRole.Add(CE_RoleEnum.设备组员.ToString()); m_billMessageServer.EndFlowMessage(m_lnqDeviceMaintenance.Bill_ID, string.Format("{0}号设备维修安装申请单已评价,请设备组组长确认", m_lnqDeviceMaintenance.Bill_ID), listRole, null); m_billNoControl.UseBill(m_lnqDeviceMaintenance.Bill_ID); } string strBillNo = m_lnqDeviceMaintenance.Bill_ID; RefreshData(); PositioningRecord(strBillNo); }
private void btnAffirm_Click(object sender, EventArgs e) { GetBillMessage(); if (!m_billServer.UpdateBill(m_masterInfo, (DataTable)dataGridView1.DataSource, AfterServiceMakePartsBillStatus.等待车间确认, out m_err)) { MessageDialog.ShowPromptMessage(m_err); } else { m_billNoControl.UseBill(m_masterInfo.BillID); MessageDialog.ShowPromptMessage("确认成功"); #region 发送知会消息 List <string> noticeRoles = new List <string>(); string strDept = m_serverDepartment.GetDeptInfoFromPersonnelInfo( m_billServer.GetBill(txtSellID.Text).Applicant).Rows[0]["DepartmentCode"].ToString(); noticeRoles.AddRange(m_billMessageServer.GetDeptDirectorRoleName(strDept)); m_msgPromulgator.EndFlowMessage(m_masterInfo.BillID, string.Format("{0} 号售后服务配件制造申请单已经处理完毕", m_masterInfo.BillID), noticeRoles, null); #endregion 发送知会消息 this.Close(); } RefershDataGridView(txtSellID.Text); }
private void 批准通过ToolStripMenuItem_Click(object sender, EventArgs e) { if (lbDJZT.Text == "等待确认出库") { UpdateBill(); #region 发送知会消息 List <string> noticeRoles = new List <string>(); string strDept = m_serverDepartment.GetDeptInfoFromPersonnelInfo( m_serverUse.GetBill(m_lnqBill.DJH).SQR).Rows[0]["DepartmentCode"].ToString(); noticeRoles.AddRange(m_billMessageServer.GetDeptDirectorRoleName(strDept)); noticeRoles.Add(m_billMessageServer.GetRoleStringForStorage(cmbStorage.Text).ToString()); m_msgPromulgator.EndFlowMessage(m_lnqBill.DJH, string.Format("{0} 号样品耗用单已经处理完毕", m_lnqBill.DJH), noticeRoles, null); #endregion 发送知会消息 } else { MessageDialog.ShowPromptMessage("请重新确认单据状态"); return; } }
private void 批准变更ToolStripMenuItem_Click(object sender, EventArgs e) { if (dataGridView1.CurrentRow.Cells["单据状态"].Value.ToString() != "等待质管批准") { MessageDialog.ShowPromptMessage("请重新确认单据状态!"); return; } bool b = m_serverProduct.AuthorizeBill(txtDJH.Text, out m_err); if (b) { MessageDialog.ShowPromptMessage("【" + txtDJH.Text + "】号单据批准变更!"); #region 发送知会消息 List <string> noticeRoles = new List <string>(); noticeRoles.Add(cmbBillType.Text == "制造部" ? CE_RoleEnum.制造负责人.ToString() : CE_RoleEnum.营销负责人.ToString()); noticeRoles.Add(CE_RoleEnum.采购账务管理员.ToString()); noticeRoles.Add(CE_RoleEnum.质量工程师.ToString()); m_msgPromulgator.EndFlowMessage(txtDJH.Text, string.Format("{0} 号营销出库单已经处理完毕", txtDJH.Text), noticeRoles, null); #endregion 发送知会消息 RefreshDataGirdView(m_serverProduct.GetAllBill()); PositioningRecord(m_lnqPdPlan.DJH); } }
private void 财务确认ToolStripMenuItem_Click(object sender, EventArgs e) { if (lbDJZT.Text != "等待财务确认") { MessageDialog.ShowPromptMessage("请重新确认单据状态"); } else { if (UpdateMessage()) { #region 发送知会消息 List <string> noticeRoles = new List <string>(); string strDept = m_serverDepartment.GetDeptInfoFromPersonnelInfo( m_threePacketsOfTheRepairServer.GetBill(strBillID, out m_strErr).FoundPersonnel).Rows[0]["DepartmentCode"].ToString(); noticeRoles.AddRange(m_billMessageServer.GetDeptDirectorRoleName(strDept)); noticeRoles.Add(CE_RoleEnum.营销普通人员.ToString()); noticeRoles.Add(CE_RoleEnum.营销总监.ToString()); noticeRoles.Add(CE_RoleEnum.线车间人员.ToString()); noticeRoles.Add(CE_RoleEnum.线主管.ToString()); noticeRoles.Add(CE_RoleEnum.会计.ToString()); noticeRoles.Add(CE_RoleEnum.制造仓库管理员.ToString()); m_billMessageServer.EndFlowMessage(strBillID, string.Format("{0} 号三包外返修处理单已经处理完毕", strBillID), noticeRoles, null); #endregion 发送知会消息 } } }
private void btnApprove_Click(object sender, EventArgs e) { GetData(); if (m_lnqReleaseProcess.SDBStatus != "等待批准") { MessageDialog.ShowPromptMessage("流程状态错误"); return; } if (!m_serverReleaseProcess.ApproveProcess(m_lnqReleaseProcess, out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); } else { m_lnqReleaseProcess = m_serverReleaseProcess.GetInfo(m_lnqReleaseProcess.SDBNo); List <string> list = new List <string>(); list.Add(UniversalFunction.GetPersonnelCode(m_lnqReleaseProcess.Auditor)); list.Add(UniversalFunction.GetPersonnelCode(m_lnqReleaseProcess.Propoer)); m_billMessageServer.EndFlowMessage(m_lnqReleaseProcess.SDBNo, string.Format("{0}号文件发布流程已结束", m_lnqReleaseProcess.SDBNo), null, list); MessageDialog.ShowPromptMessage("批准成功"); this.Close(); } }
private void 提交确认结果ToolStripMenuItem_Click(object sender, EventArgs e) { if (dataGridView1.CurrentRow.Cells["单据状态"].Value.ToString() == "等待最终确认") { if (!UpdateBill()) { return; } #region 发送知会消息 List <string> noticeRoles = new List <string>(); noticeRoles.Add(CE_RoleEnum.质量工程师.ToString()); m_billMessageServer.EndFlowMessage(m_lnqQuality.Bill_ID, string.Format("{0} 号不合格品隔离处置单已经处理完毕", m_lnqQuality.Bill_ID), noticeRoles, null); #endregion 发送知会消息 } else { MessageDialog.ShowErrorMessage("请重新确认单据状态"); } }
private void btnAffirm_Click(object sender, EventArgs e) { GetInfo(); if (!CheckData()) { return; } if (!m_serverReturn.AffirmBill(m_lnqBill.BillNo, m_dtList, out m_strError)) { MessageDialog.ShowPromptMessage(m_strError); } else { List <string> listPersonnel = new List <string>(); listPersonnel.Add(UniversalFunction.GetPersonnelCode(m_lnqBill.Proposer)); listPersonnel.Add(UniversalFunction.GetPersonnelCode(m_lnqBill.Audit)); m_billMessageServer.EndFlowMessage(m_lnqBill.BillNo, string.Format("{0}号还货单已完成", m_lnqBill.BillNo), null, listPersonnel); m_billNoControl.UseBill(m_lnqBill.BillNo); MessageDialog.ShowPromptMessage("确认成功"); this.Close(); } }
private void 盘点确认ToolStripMenuItem_Click(object sender, EventArgs e) { if (lblBillStatus.Text == "等待仓管确认") { UpdateStatus(lblBillStatus.Text); #region 发送知会消息 List <string> noticeRoles = new List <string>(); string strDept = m_serverDepartment.GetDeptInfoFromPersonnelInfo( m_serverStroageCheck.GetBill(txtBill_ID.Text).BZRY).Rows[0]["DepartmentCode"].ToString(); noticeRoles.AddRange(m_billMessageServer.GetDeptDirectorRoleName(strDept)); noticeRoles.Add(CE_RoleEnum.制造分管领导.ToString()); noticeRoles.Add(m_billMessageServer.GetRoleStringForStorage(cmbStorage.Text).ToString()); noticeRoles.Add(CE_RoleEnum.财务主管.ToString()); noticeRoles.Add(CE_RoleEnum.会计.ToString()); m_billMessageServer.EndFlowMessage(m_lnqCheck.DJH, string.Format("{0} 号库房盘点单已经处理完毕", m_lnqCheck.DJH), noticeRoles, null); #endregion 发送知会消息 } else { MessageDialog.ShowPromptMessage("请重新确认单据状态"); } }
private void 负责人toolStripButton_Click(object sender, EventArgs e) { if (txtStatus.Text.Trim() != OverTimeBillStatus.等待部门负责人审核.ToString()) { MessageDialog.ShowPromptMessage("请确认单据状态"); return; } HR_WorkScheduling workSchedule = new HR_WorkScheduling(); workSchedule.ID = Convert.ToInt32(txtBillNo.Text); workSchedule.DeptDirector = BasicInfo.LoginID; workSchedule.DeptDirectorSignatureDate = ServerTime.Time; workSchedule.BillStatus = OverTimeBillStatus.已完成.ToString(); if (!m_workSchedulingServer.UpdateAuditingWorkScheduling(workSchedule, "负责人", out error)) { MessageDialog.ShowPromptMessage(error); return; } else { MessageDialog.ShowPromptMessage("部门负责人确认成功!"); txtStatus.Text = workSchedule.BillStatus; List <string> noticeRoles = new List <string>(); List <string> noticeUser = new List <string>(); noticeUser.Add(txtCreaterWorkID.Tag.ToString()); m_billMessageServer.EndFlowMessage(txtBillNo.Text, string.Format("{0} 号排班信息已经处理完毕", txtBillNo.Text), noticeRoles, noticeUser); this.Close(); } }
private void btnJudge_Click(object sender, EventArgs e) { GetData(); if (m_lnqReviewProcess.SDBStatus == "流程已结束" || m_lnqReviewProcess.SDBStatus == "新建流程") { MessageDialog.ShowPromptMessage("流程状态错误"); return; } if (!m_serverReviewProcess.JudgeProcess(m_lnqReviewProcess, out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); } else { MessageDialog.ShowPromptMessage("提交成功"); List <string> listPersonnel = new List <string>(); listPersonnel.Add(UniversalFunction.GetPersonnelCode(m_lnqReviewProcess.Propoer)); listPersonnel.Add(UniversalFunction.GetPersonnelCode(m_lnqReviewProcess.Auditor)); foreach (FM_ReviewProcessPointListInfo item in m_listPointInfo) { listPersonnel.Add(item.PointPersonnel); } m_billMessageServer.EndFlowMessage(m_lnqReviewProcess.SDBNo, string.Format("{0}号文件审查流程已结束", m_lnqReviewProcess.SDBNo), null, listPersonnel); m_billNoControl.UseBill(m_lnqReviewProcess.SDBNo); this.Close(); } }
private void 确认调入ToolStripMenuItem_Click(object sender, EventArgs e) { if (lbDJZT.Text == "等待仓管调入") { DataForMessage("等待仓管调入"); #region 发送知会消息 List <string> noticeRoles = new List <string>(); noticeRoles.Add(CE_RoleEnum.质量工程师.ToString()); noticeRoles.Add(CE_RoleEnum.质控主管.ToString()); noticeRoles.Add(m_billMessageServer.GetRoleStringForStorage(cmbStorage.Text).ToString()); noticeRoles.Add(CE_RoleEnum.检验员.ToString()); noticeRoles.Add(m_billMessageServer.GetDeptDirectorRoleName(m_lnqIslation.CLBM)[0].ToString()); m_billMessageServer.EndFlowMessage(m_lnqIslation.DJH, string.Format("{0} 号不合格品隔离处置单已经处理完毕", m_lnqIslation.DJH), noticeRoles, null); #endregion 发送知会消息 } else { MessageBox.Show("请重新确认单据状态", "提示"); } PositioningRecord(m_lnqIslation.DJH); }
/// <summary> /// 仓管确认事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAffirm_Click(object sender, EventArgs e) { if (m_intDJID != 0 && m_strDJZTFlag == "已复审") { DataTable dtTemp = (DataTable)dgv_Main.DataSource; for (int i = 0; i < dtTemp.Rows.Count; i++) { if (!m_serverProductCode.IsFitCount(Convert.ToInt32(dtTemp.Rows[i]["CPID"]), Convert.ToInt32(dtTemp.Rows[i]["Count"]), m_strDJH)) { MessageBox.Show("请对产品设置流水号,并保证产品数量与流水号数一致", "提示"); return; } } if (m_findSellIn.AffrimBill(m_intDJID, CE_MarketingType.退货, (DataTable)dgv_Main.DataSource, out m_err)) { MessageBox.Show("确认完毕!", "提示"); #region 发送知会消息 List <string> noticeRoles = new List <string>(); string strDept = m_findDepartmentServer.GetDeptInfoFromPersonnelInfo( m_findSellIn.GetBill(m_strDJH, m_intDJID).Rows[0]["LRRY"].ToString()).Rows[0]["DepartmentCode"].ToString(); noticeRoles.AddRange(m_billMessageServer.GetDeptDirectorRoleName(strDept)); noticeRoles.Add(CE_RoleEnum.质量工程师.ToString()); noticeRoles.Add(CE_RoleEnum.线主管.ToString()); noticeRoles.Add(m_billMessageServer.GetRoleStringForStorage(cmbStorage.Text).ToString()); m_billMessageServer.EndFlowMessage(txtSellID.Text, string.Format("{0} 号营销退货单已经处理完毕", txtSellID.Text), noticeRoles, null); #endregion 发送知会消息 m_billNoControl.UseBill(txtSellID.Text); this.Close(); } else { MessageDialog.ShowErrorMessage(m_err); return; } } else if (m_intDJID != 0) { MessageBox.Show("请重新确认单据状态!", "提示"); return; } else { MessageBox.Show("单据ID无效,请重新确认!", "提示"); return; } }
private void btnSign_Click(object sender, EventArgs e) { OperatorFlow(SystemFileDORRList.签收); FM_FileList lnqTemp = m_serverFileBasic.GetFile(m_lnqDORRList.FileID); m_billMessageServer.EndFlowMessage("DORR" + m_lnqDORRList.ID.ToString(), string.Format("{0}文件已签收", lnqTemp.FileName + "[" + lnqTemp.FileNo + "]"), null, null); }
private void 确认通过ToolStripMenuItem_Click(object sender, EventArgs e) { bool blflag = false; foreach (DataGridViewRow row in dataGridView1.SelectedRows) { m_lnqTechnology.DJH = row.Cells["单据号"].Value.ToString(); m_lnqTechnology.DJZT = row.Cells["单据状态"].Value.ToString(); if (row.Cells["单据状态"].Value.ToString() != "等待批准") { MessageDialog.ShowPromptMessage("请重新确认单据状态"); blflag = true; } if (!m_serverTechnology.UpdateBill(m_lnqTechnology, out m_err)) { MessageDialog.ShowPromptMessage(m_err); blflag = true; } else { m_billNoControl.UseBill(m_lnqTechnology.DJH); #region 发送知会消息 List <string> noticeRoles = new List <string>(); noticeRoles.Add(CE_RoleEnum.零件工程师.ToString()); noticeRoles.Add(CE_RoleEnum.开发部办公室文员.ToString()); noticeRoles.Add(CE_RoleEnum.采购账务管理员.ToString()); m_msgPromulgator.EndFlowMessage(m_lnqTechnology.DJH, string.Format("{0} 号技术变更单已经处理完毕", m_lnqTechnology.DJH), noticeRoles, null); #endregion 发送知会消息 } } if (!blflag) { MessageDialog.ShowPromptMessage("批准成功"); } RefreshDataGirdView(m_serverTechnology.GetAllBill()); PositioningRecord(m_lnqTechnology.DJH); }
private void 最终审核ToolStripMenuItem_Click(object sender, EventArgs e) { if (m_lnqFrock.DJZT == "等待最终审核") { if (UpdateMessage("等待最终审核")) { #region 发送知会消息 List <string> noticeRoles = new List <string>(); noticeRoles.Add(CE_RoleEnum.工艺人员.ToString()); noticeRoles.Add(CE_RoleEnum.制造信息员.ToString()); noticeRoles.Add(CE_RoleEnum.计量工程师.ToString()); noticeRoles.Add(CE_RoleEnum.采购员.ToString()); m_msgPromulgator.EndFlowMessage(m_lnqFrock.DJH, string.Format("{0} 号工装验证报告单已经处理完毕", m_lnqFrock.DJH), noticeRoles, null); #endregion 发送知会消息 //销毁工装台帐的提醒消息 if (m_lnqFrock.BillType == "周期鉴定") { List <string> listRoles = new List <string>(); listRoles.Add(CE_RoleEnum.工艺人员.ToString()); listRoles.Add(CE_RoleEnum.装配用工装管理员.ToString()); listRoles.Add(CE_RoleEnum.机加用工装管理员.ToString()); listRoles.Add(CE_RoleEnum.计量工程师.ToString()); m_msgPromulgatorBook.EndFlowMessage(m_lnqFrock.FrockNumber, string.Format("{0}号工装已完成周期鉴定", m_lnqFrock.FrockNumber), listRoles, null); } RefreshDataGirdView(); PositioningRecord(m_lnqFrock.DJH); } } else { MessageDialog.ShowPromptMessage("请重新确认单据状态"); return; } }
private void 确认通过ToolStripMenuItem_Click(object sender, EventArgs e) { try { foreach (DataGridViewRow item in dataGridView1.SelectedRows) { if (item.Cells["单据状态"].Value.ToString() != "等待批准") { MessageDialog.ShowPromptMessage("【" + item.Cells["单据号"].Value.ToString() + "】号单据状态不正确"); return; } else { m_lnqProductReleases.BillNo = item.Cells["单据号"].Value.ToString(); if (!m_serverReleases.SubmitBill(m_lnqProductReleases, out m_strErr)) { throw new Exception(m_strErr); } else { List <string> noticeRoles = new List <string>(); noticeRoles.Add(CE_RoleEnum.质量工程师.ToString()); noticeRoles.Add(CE_RoleEnum.质控负责人.ToString()); List <string> noticeUers = new List <string>(); noticeRoles.Add(UniversalFunction.GetPersonnelCode(item.Cells["申请人"].Value.ToString())); m_msgPromulgator.EndFlowMessage(m_lnqProductReleases.BillNo, string.Format("{0} 号下线不合格品放行单已经处理完毕", m_lnqProductReleases.BillNo), noticeRoles, noticeUers); } } } MessageDialog.ShowPromptMessage("批准成功"); } catch (Exception ex) { m_strErr = ex.Message; MessageDialog.ShowPromptMessage(m_strErr); } 刷新数据ToolStripMenuItem_Click(null, null); }
private void 检验结果提交ToolStripMenuItem_Click(object sender, EventArgs e) { if (lbDJZT.Text == "等待检验结果") { if (Convert.ToDecimal(txtDeclareCount.Text) != (decimal)NudQC_BF.Value + (decimal)NudQC_HG.Value + (decimal)NudQC_RB.Value + (decimal)NudQC_TH.Value) { MessageBox.Show("【合格数 + 让步数 + 退货数 + 报废数 = 挑返数】 请重新确认", "提示"); return; } View_S_CheckOutInDepotBill bill = m_serverCheckOutInDepot.GetBill(m_lnqReturn.InDepotBillID); DataForMessage(); #region 发送知会消息 List <string> noticeRoles = new List <string>(); noticeRoles.Add(CE_RoleEnum.检验员.ToString()); noticeRoles.Add(CE_RoleEnum.采购员.ToString()); noticeRoles.Add(CE_RoleEnum.SQE组员.ToString()); m_msgPromulgator.EndFlowMessage(dataGridView1.CurrentRow.Cells["单据号"].Value.ToString(), string.Format("{0} 号挑选返工返修单已经处理完毕", dataGridView1.CurrentRow.Cells["单据号"].Value.ToString()), noticeRoles, null); StringBuilder sb = new StringBuilder(); sb.AppendFormat("{0} 号报检入库单已经进行挑返, 等待仓库入库, ", txtBill_ID.Text); sb.AppendFormat("此单据涉及物品:(图号[{0}],名称[{1}],规格[{2}]", txtCode.Text, txtName.Text, txtSpec.Text); m_msgPromulgatorInDept.PassFlowMessage(m_lnqReturn.InDepotBillID, sb.ToString(), m_msgPromulgator.GetRoleStringForStorage(bill.库房代码).ToString(), true); #endregion 发送知会消息 } else { MessageBox.Show("请重新确认单据状态", "提示"); } PositioningRecord(m_lnqReturn.DJH); }
private void btnAuditing_Click(object sender, EventArgs e) { if (lbBillStatus.Text != "等待主管审核") { MessageDialog.ShowPromptMessage("请重新确认单据状态"); return; } DataTable dtTemp = (DataTable)dataGridView1.DataSource; if (dtTemp.Rows.Count == 0) { MessageDialog.ShowPromptMessage("明细信息记录数为0,不能生成调运单"); return; } for (int i = 0; i < dtTemp.Rows.Count; i++) { if (Convert.ToDecimal(dtTemp.Rows[i]["审核数量"]) == 0) { MessageDialog.ShowPromptMessage("审核数量不能为0"); return; } } if (!m_serverAfterService.VerifyBill(m_lnqAfterService, dtTemp, out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); } else { MessageDialog.ShowPromptMessage("审核成功"); List <string> noticeUser = new List <string>(); noticeUser.Add(UniversalFunction.GetPersonnelCode(m_lnqAfterService.Proposer)); m_billNoControl.UseBill(m_lnqAfterService.Bill_ID); m_billMessageServer.EndFlowMessage(m_lnqAfterService.Bill_ID, string.Format("{0}号售后配件申请单已完成", m_lnqAfterService.Bill_ID), null, noticeUser); this.Close(); } }
private void btnReceiving_Click(object sender, EventArgs e) { if (lbBillStatus.Text != "等待入库") { MessageDialog.ShowPromptMessage("请重新确认单据状态"); return; } if (SubmitData()) { MessageDialog.ShowPromptMessage("入库成功"); m_billMessageServer.EndFlowMessage(m_lnqManeuverBill.Bill_ID, string.Format("{0}号调运单收货方已入库", m_lnqManeuverBill.Bill_ID), null, IntegrativeQuery.GetStorageOrStationPrincipal(m_lnqManeuverBill.OutStorageID)); this.Close(); } }
void StatusChange(DepotManagementDataContext ctx, string code) { var varBook = from a in ctx.S_GaugeStandingBook where a.GaugeCoding == code select a; S_GaugeStandingBook bookInfo = varBook.FirstOrDefault(); var varFile = from a in ctx.Bus_Gauge_Files where a.GaugeCode == code && a.FileType == "校准证书" select a; if (varFile.Count() > 0) { DateTime tempDate = (DateTime)varFile.Select(k => k.FileDate).Max(); bookInfo.EffectiveDate = tempDate.AddMonths((int)bookInfo.Validity); IBillMessagePromulgatorServer billMessageServer = BasicServerFactory.GetServerModule <IBillMessagePromulgatorServer>(); billMessageServer.BillType = "量检具台账"; billMessageServer.EndFlowMessage(code, "已提交了校准证书", null, null); } else { bookInfo.EffectiveDate = null; } var varScrapt = from a in ctx.Bus_Gauge_Files where a.GaugeCode == code && a.FileType == "报废记录" select a; if (varScrapt.Count() > 0) { bookInfo.ScrapFlag = true; } else { bookInfo.ScrapFlag = false; } }
private void 确认信息ToolStripMenuItem_Click(object sender, EventArgs e) { if (dataGridView1.CurrentRow.Cells["单据状态"].Value.ToString() == "等待仓管确认入库") { m_lnqAffirm.LayerNumber = m_lnqAffirm.LayerNumber == null ? "" : m_lnqAffirm.LayerNumber; m_lnqAffirm.ColumnNumber = m_lnqAffirm.ColumnNumber == null ? "" : m_lnqAffirm.ColumnNumber; m_lnqAffirm.ShelfArea = m_lnqAffirm.ShelfArea == null ? "" : m_lnqAffirm.ShelfArea; if (!UpdateForBill()) { return; } #region 发送知会消息 List <string> noticeRoles = new List <string>(); string strDept = m_serverDepartment.GetDeptInfoFromPersonnelInfo( m_serverMuster.GetBill(m_lnqAffirm.DJH).SQR).Rows[0]["DepartmentCode"].ToString(); noticeRoles.AddRange(m_billMessageServer.GetDeptDirectorRoleName(strDept)); noticeRoles.Add(CE_RoleEnum.SQE组员.ToString()); noticeRoles.Add(m_billMessageServer.GetRoleStringForStorage(m_lnqAffirm.StorageID).ToString()); noticeRoles.Add(CE_RoleEnum.项目经理.ToString()); noticeRoles.Add(CE_RoleEnum.检验员.ToString()); noticeRoles.Add(CE_RoleEnum.产品开发主管.ToString()); noticeRoles.Add(CE_RoleEnum.质控主管.ToString()); noticeRoles.Add(CE_RoleEnum.零件工程师.ToString()); m_billMessageServer.EndFlowMessage(m_lnqAffirm.DJH, string.Format("{0} 号样品确认申请单已经处理完毕", m_lnqAffirm.DJH), noticeRoles, null); #endregion 发送知会消息 } else { MessageDialog.ShowErrorMessage("请重新确认单据状态"); } }
private void btnAuditing_Click(object sender, EventArgs e) { if (!m_serverQualityProblem.AuditingSundrySchedule("新品开发计划表", m_lnqNewProductDevelopment.Bill_ID, out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); return; } else { MessageDialog.ShowPromptMessage("审核成功"); List <string> strList = new List <string>(); strList.Add(CE_RoleEnum.质量工程师.ToString()); m_billMessageServer.EndFlowMessage(m_lnqNewProductDevelopment.Bill_ID, string.Format("{0} 号新品开发计划表已经处理完毕", m_lnqNewProductDevelopment.Bill_ID), strList, null); this.Close(); } }
private void btnAuditingAnalysisResult_Click(object sender, EventArgs e) { if (!m_serverQualityProblem.AuditingAnalysisResult(m_lnqAssemblingAnalysis.Bill_ID, out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); return; } else { MessageDialog.ShowPromptMessage("审核分析结果成功"); List <string> strList = new List <string>(); strList.Add(CE_RoleEnum.质量工程师.ToString()); m_billMessageServer.EndFlowMessage(m_lnqAssemblingAnalysis.Bill_ID, string.Format("{0} 号搭车分析计划表已经处理完毕", m_lnqAssemblingAnalysis.Bill_ID), strList, null); this.Close(); } }
private void 主管审核toolStripButton1_Click(object sender, EventArgs e) { if (!CheckControl()) { return; } if (!m_tcuRepairServer.ConfirmUpdateData(dataGridView1.CurrentRow.Cells["单号"].Value.ToString(), out m_error)) { MessageDialog.ShowPromptMessage(m_error); } MessageDialog.ShowPromptMessage("确认成功!"); List <string> noticeUser = new List <string>(); noticeUser.Add(txtRecorder.Tag.ToString()); m_billMessageServer.EndFlowMessage(dataGridView1.CurrentRow.Cells["单号"].Value.ToString(), string.Format("{0} 号TCU返修信息,已完成", dataGridView1.CurrentRow.Cells["单号"].Value.ToString()), null, noticeUser); RefreshControl(); }
public void DirectAdd(string billNo) { DepotManagementDataContext ctx = CommentParameter.DepotDataContext; var varData = from a in ctx.Flow_FlowBillData where a.BillNo == billNo select a; if (varData.Count() != 1) { throw new Exception("数据不唯一"); } Flow_FlowBillData tempLnq = varData.Single(); tempLnq.FlowID = 67; ctx.SubmitChanges(); IBillMessagePromulgatorServer msgPromulgator = BasicServerFactory.GetServerModule <IBillMessagePromulgatorServer>(); msgPromulgator.BillType = CE_BillTypeEnum.创意提案.ToString(); msgPromulgator.EndFlowMessage(billNo, "直接录入", null, null); }
private void 保存采购计划ToolStripMenuItem_Click(object sender, EventArgs e) { if (lbDJZT.Text != "单据已完成") { DataTable dt = (DataTable)dataGridView1.DataSource; string strNy = cmbYear.Text.Trim() + cmbMonth.Text.Trim(); dt = m_serverPurPlan.GetOrderGoodsCount(dt); dt = m_serverPurPlan.GetOrderGoodsPrice(dt); if (!m_serverPurPlan.UpdateBill(dt, strNy, out m_err)) { MessageDialog.ShowPromptMessage(m_err); } else { MessageDialog.ShowPromptMessage("保存成功"); m_msgPromulgator.DestroyMessage(strNy); //m_msgPromulgator.SendNewFlowMessage(strNy, // string.Format("{0}号采购计划已提交,请等待采购主管审核", strNy), // BillFlowMessage_ReceivedUserType.角色, RoleEnum.生产管理部负责人.ToString()); #region 消息流 DataTable dtMarketing = new DataTable(); DataTable dtProduct = new DataTable(); m_serverPurPlan.GetMarketingPlanAndProductPlan(strNy, out dtMarketing, out dtProduct); if (dtMarketing != null) { List <string> noticeRoles = new List <string>(); noticeRoles.Add(CE_RoleEnum.营销普通人员.ToString()); noticeRoles.Add(CE_RoleEnum.营销负责人.ToString()); noticeRoles.Add(CE_RoleEnum.营销分管领导.ToString()); for (int i = 0; i < dtMarketing.Rows.Count; i++) { m_msgPromulgatorForMarketing.EndFlowMessage( dtMarketing.Rows[i]["DJH"].ToString(), string.Format("{0} 号营销要货计划已经处理完毕", dtMarketing.Rows[i]["DJH"].ToString()), noticeRoles, null); } } if (dtProduct != null) { List <string> noticeRoles = new List <string>(); noticeRoles.Add(CE_RoleEnum.制造部办公室文员.ToString()); noticeRoles.Add(CE_RoleEnum.制造负责人.ToString()); noticeRoles.Add(CE_RoleEnum.制造分管领导.ToString()); for (int i = 0; i < dtProduct.Rows.Count; i++) { m_msgPromulgatorForMarketing.EndFlowMessage( dtProduct.Rows[i]["DJH"].ToString(), string.Format("{0} 号生产计划已经处理完毕", dtProduct.Rows[i]["DJH"].ToString()), noticeRoles, null); } } #endregion ShowDate(0); } } else { MessageDialog.ShowPromptMessage("请重新确认计划状态"); } }
/// <summary> /// 仓管确认事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnAffirm_Click(object sender, EventArgs e) { if (m_intDJID != 0 && m_strDJZTFlag == "已批准") { DataTable dtTemp = (DataTable)dgv_Main.DataSource; BASE_Storage storageInfo_Out = UniversalFunction.GetStorageInfo(cmbOutStorage.Text); BASE_Storage storageInfo_In = UniversalFunction.GetStorageInfo(cmbInStorage.Text); if (storageInfo_In.StorageID == storageInfo_Out.StorageID) { throw new Exception("【入库库房】与【出库库房】是同一库房,无法操作"); } if (storageInfo_In.ZeroCostFlag != storageInfo_Out.ZeroCostFlag) { throw new Exception("【入库库房】与【出库库房】财务结算属性不一致,不能相互调拨"); } for (int i = 0; i < dtTemp.Rows.Count; i++) { if (!m_serverProductCode.IsFitCount(Convert.ToInt32(dtTemp.Rows[i]["GoodsID"]), Convert.ToInt32(dtTemp.Rows[i]["Count"]), m_strDJH)) { MessageBox.Show("请对产品设置流水号,并保证产品数量与流水号数一致", "提示"); return; } } if (m_serverCannibalize.AffirmBill(m_intDJID, out m_err)) { #region 发送知会消息 List <string> noticeRoles = new List <string>(); string strDept = m_serverDepartment.GetDeptInfoFromPersonnelInfo( m_serverCannibalize.GetBill(m_intDJID).LRRY).Rows[0]["DepartmentCode"].ToString(); noticeRoles.AddRange(m_billMessageServer.GetDeptDirectorRoleName(strDept)); noticeRoles.Add(m_billMessageServer.GetRoleStringForStorage(cmbOutStorage.Text).ToString()); noticeRoles.Add(m_billMessageServer.GetRoleStringForStorage(cmbInStorage.Text).ToString()); noticeRoles.Add(CE_RoleEnum.财务主管.ToString()); noticeRoles.Add(CE_RoleEnum.会计.ToString()); m_billMessageServer.EndFlowMessage(txtSellID.Text, string.Format("{0} 号库房调拨单已经处理完毕", txtSellID.Text), noticeRoles, null); #endregion 发送知会消息 MessageBox.Show("确认完毕!", "提示"); m_billNoControl.UseBill(txtSellID.Text); this.Close(); } else { MessageDialog.ShowErrorMessage(m_err); return; } } else if (m_intDJID != 0) { MessageBox.Show("请重新确认单据状态!", "提示"); return; } else { MessageBox.Show("单据ID无效,请重新确认!", "提示"); return; } }