private void btnFind_Click(object sender, EventArgs e) { CustomDataGridView dgv = GetDataGridView(tabControl1.SelectedTab); if (dgv.CurrentRow == null) { return; } object obj = SetFlowInfo_BillNo(dgv as DataGridView, "业务编号"); if (tabControl1.SelectedTab.Text == "待处理") { FormCommonProcess frm = new FormCommonProcess(_Enum_BillType, cmbVersion.Text, obj as CustomFlowForm, CE_OperatorMode.编辑); SetFormBusinessInfo(dgv as DataGridView, CE_OperatorMode.编辑, _Enum_BillType, "业务编号", ref frm); frm.CommonProcessSubmit += new FormCommonProcess.FormSubmit(frm_CommonProcessSubmit); m_operationType = CE_FlowOperationType.未知; if (frm.ShowDialog() == DialogResult.OK) { SendMessage(); } } else { FormCommonProcess frm = new FormCommonProcess(_Enum_BillType, cmbVersion.Text, obj as CustomFlowForm, CE_OperatorMode.查看); SetFormBusinessInfo(dgv as DataGridView, CE_OperatorMode.查看, _Enum_BillType, "业务编号", ref frm); frm.ShowDialog(); } RefreshData(tabControl1.SelectedTab); PositioningRecord(GetFlowInfo_BillNo(obj)); }
private bool 车间批次管理变更明细_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { if (txtReason.Text.Trim().Length == 0) { throw new Exception("请填写【变更原因】"); } if (customDataGridView1.Rows.Count == 0) { throw new Exception("请录入【明细】信息"); } Business_WorkShop_BatchNoChange changeInfo = new Business_WorkShop_BatchNoChange(); changeInfo.BillNo = txtBillNo.Text; changeInfo.Reason = txtReason.Text; this.ResultInfo = changeInfo; this.FlowOperationType = flowOperationType; this.ResultList.Add(GetDetail()); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool 年度预算申请表明细_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { if (cmbYearValue.Text.Trim().Length == 0) { throw new Exception("请填写【预算年份】"); } if (customDataGridView1.Rows.Count == 0) { throw new Exception("请录入【明细】信息"); } Business_Finance_Budget_Year yearInfo = new Business_Finance_Budget_Year(); yearInfo.BillNo = txtBillNo.Text; yearInfo.YearValue = Convert.ToInt32(cmbYearValue.Text); this.ResultInfo = yearInfo; this.FlowOperationType = flowOperationType; this.ResultList.Add(GetDetail()); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool 生产BOM变更单明细_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { GetInfo(); if (lbBillStatus.Text == CE_CommonBillStatus.新建单据.ToString() && flowOperationType == CE_FlowOperationType.提交) { CheckInfo(); } FlowOperationType = flowOperationType; ResultInfo = _lnqPBOMBill; this.ResultList = new List <object>(); ResultList.Add(_listDetail); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { try { if (!CheckData(flowOperationType)) { return(false); } GetInfo(); this.FlowInfo_BillNo = txtBillNo.Text; this.FlowInfo_StorageIDOrWorkShopCode = m_lnqBillInfo.StorageID; this.KeyWords = "【" + UniversalFunction.GetGoodsInfo(m_lnqBillInfo.GoodsID).物品名称 + "】【" + m_lnqBillInfo.BatchNo + "】"; this.ResultList = new List <object>(); this.ResultList.Add(m_lnqBillInfo); this.ResultList.Add(flowOperationType); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool 月度预算申请表明细_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { if (cmbYearValue.Text.Trim().Length == 0) { throw new Exception("请填写【预算年份】"); } if (cmbMonthValue.Text.Trim().Length == 0) { throw new Exception("请填写【预算月份】"); } if (customDataGridView1.Rows.Count == 0) { throw new Exception("请录入【明细】信息"); } this.ResultInfo = _LnqBillInfo; this.FlowOperationType = flowOperationType; this.ResultList.Add(GetDetail()); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool customPanel1_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { if (!CheckSubmitInfo()) { return(false); } m_lnqBillInfo.BillNo = txtBillNo.Text; m_lnqBillInfo.FileCode = txtFileCode.Text; m_lnqBillInfo.FileInfo = m_byteData; m_lnqBillInfo.Reason = txtReason.Text; List <View_Business_Base_BomChange_PartsLibrary> listLibrary = (dataGridViewLibrary.DataSource as BindingCollection <View_Business_Base_BomChange_PartsLibrary>).ToList(); ResultInfo = m_lnqBillInfo; FlowInfo_BillNo = m_lnqBillInfo.BillNo; FlowOperationType = flowOperationType; this.ResultList = new List <object>(); ResultList.Add(m_listStruct); ResultList.Add(listLibrary); KeyWords = "【技术变更单号】:" + m_lnqBillInfo.FileCode; return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { try { if (!CheckData()) { return(false); } m_lnqBillInfo = new Business_InspectionJudge_InspectionReport(); m_lnqBillInfo.BillNo = txtBillNo.Text; m_lnqBillInfo.InspectionReportNo = txtInspectionReportNo.Text; m_lnqBillInfo.BatchNo = txtBatchNo.Text; m_lnqBillInfo.BillRelate = txtBillRelate.Text; m_lnqBillInfo.Checker = txtChecker.Tag.ToString(); m_lnqBillInfo.GoodsCount = numGoodsCount.Value; m_lnqBillInfo.GoodsID = Convert.ToInt32(txtGoodsCode.Tag); m_lnqBillInfo.GoodsImportance = cmbGoodsImportance.Text; m_lnqBillInfo.GoodsType1 = cmbGoodsType1.Text; m_lnqBillInfo.GoodsType2 = cmbGoodsType2.Text; m_lnqBillInfo.InspectionExplain = txtInspectionExplain.Text; m_lnqBillInfo.IsQualified = chbIsQualified.Checked; m_lnqBillInfo.Provider = txtProvider.Text; m_lnqBillInfo.CheckDate = dtpCheckDate.Value; List <View_Business_InspectionJudge_InspectionReport_Item> listTemp = new List <View_Business_InspectionJudge_InspectionReport_Item>(); foreach (DataGridViewRow dgvr in customDataGridView1.Rows) { View_Business_InspectionJudge_InspectionReport_Item detailTemp = new View_Business_InspectionJudge_InspectionReport_Item(); detailTemp.检验项目 = dgvr.Cells["检验项目"].Value == null ? "" : dgvr.Cells["检验项目"].Value.ToString(); detailTemp.检验结果 = dgvr.Cells["检验结果"].Value == null ? "" : dgvr.Cells["检验结果"].Value.ToString(); detailTemp.单据号 = txtBillNo.Text; listTemp.Add(detailTemp); } this.FlowInfo_BillNo = txtBillNo.Text; this.ResultInfo = listTemp; this.ResultList = new List <object>(); this.ResultList.Add(m_lnqBillInfo); this.ResultList.Add(flowOperationType); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { try { if (!CheckData()) { return(false); } m_lnqBillInfo = new Business_PurchasingMG_PartsBelongPriovderChange(); m_lnqBillInfo.BillNo = txtBillNo.Text; m_lnqBillInfo.ChangeReason = txtChangeReason.Text; m_lnqBillInfo.ChangeType = cmbChangeType.Text; m_lnqBillInfo.Provider = txtProvider.Text; List <View_Business_PurchasingMG_PartsBelongPriovderChangeDetail> listTemp = new List <View_Business_PurchasingMG_PartsBelongPriovderChangeDetail>(); foreach (DataGridViewRow dr in customDataGridView1.Rows) { View_Business_PurchasingMG_PartsBelongPriovderChangeDetail tempInfo = new View_Business_PurchasingMG_PartsBelongPriovderChangeDetail(); tempInfo.单据号 = dr.Cells["单据号"].Value.ToString(); tempInfo.规格 = dr.Cells["规格"].Value.ToString(); tempInfo.零件类型 = dr.Cells["零件类型"].Value.ToString(); tempInfo.供应商等级 = dr.Cells["供应商等级"].Value.ToString(); tempInfo.难度等级 = dr.Cells["难度等级"].Value.ToString(); tempInfo.说明 = dr.Cells["说明"].Value.ToString(); tempInfo.图号型号 = dr.Cells["图号型号"].Value.ToString(); tempInfo.物品ID = Convert.ToInt32(dr.Cells["物品ID"].Value); tempInfo.物品名称 = dr.Cells["物品名称"].Value.ToString(); listTemp.Add(tempInfo); } this.FlowInfo_BillNo = txtBillNo.Text; this.ResultInfo = listTemp; this.ResultList = new List <object>(); this.ResultList.Add(m_lnqBillInfo); this.ResultList.Add(flowOperationType); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { try { if (!CheckData()) { return(false); } m_lnqBillInfo = new Business_WarehouseInPut_AOG(); m_lnqBillInfo.BillNo = txtBillNo.Text; m_lnqBillInfo.Remark = txtRemark.Text; List <View_Business_WarehouseInPut_AOGDetail> listTemp = new List <View_Business_WarehouseInPut_AOGDetail>(); foreach (DataGridViewRow dgvr in customDataGridView1.Rows) { View_Business_WarehouseInPut_AOGDetail detailTemp = new View_Business_WarehouseInPut_AOGDetail(); detailTemp.关联业务 = dgvr.Cells["关联业务"].Value == null ? "" : dgvr.Cells["关联业务"].Value.ToString(); detailTemp.备注 = dgvr.Cells["备注"].Value == null ? "" : dgvr.Cells["备注"].Value.ToString(); detailTemp.单据号 = txtBillNo.Text; detailTemp.单位 = dgvr.Cells["单位"].Value == null ? "" : dgvr.Cells["单位"].Value.ToString(); detailTemp.供应商 = dgvr.Cells["供应商"].Value == null ? "" : dgvr.Cells["供应商"].Value.ToString(); detailTemp.规格 = dgvr.Cells["规格"].Value == null ? "" : dgvr.Cells["规格"].Value.ToString(); detailTemp.批次号 = dgvr.Cells["批次号"].Value == null ? "" : dgvr.Cells["批次号"].Value.ToString(); detailTemp.数量 = Convert.ToDecimal(dgvr.Cells["数量"].Value); detailTemp.图号型号 = dgvr.Cells["图号型号"].Value == null ? "" : dgvr.Cells["图号型号"].Value.ToString(); detailTemp.物品ID = Convert.ToInt32(dgvr.Cells["物品ID"].Value); detailTemp.物品名称 = dgvr.Cells["物品名称"].Value == null ? "" : dgvr.Cells["物品名称"].Value.ToString(); listTemp.Add(detailTemp); } this.FlowInfo_BillNo = txtBillNo.Text; this.ResultInfo = listTemp; this.ResultList = new List <object>(); this.ResultList.Add(m_lnqBillInfo); this.ResultList.Add(flowOperationType); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool 培训计划申请表明细_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { if (cmbYear.Text.Trim().Length == 0) { MessageDialog.ShowPromptMessage("请选择【计划年份】"); return(false); } if (cmbPlanType.Text.Trim().Length == 0) { MessageDialog.ShowPromptMessage("请选择【计划类型】"); return(false); } _LnqPlanInfo = new HR_Train_Plan(); _LnqPlanInfo.BillNo = txtBillNo.Text; _LnqPlanInfo.YearValue = Convert.ToInt32(cmbYear.Text); _LnqPlanInfo.Department = BasicInfo.DeptCode; _LnqPlanInfo.PlanType = cmbPlanType.Text; this.ResultInfo = _LnqPlanInfo; this.FlowOperationType = flowOperationType; if (_ListPlanCourse.Count() == 0) { MessageDialog.ShowPromptMessage("未添加任何【课程计划】"); return(false); } if (_ListPlanUser.Count() == 0) { MessageDialog.ShowPromptMessage("未选择任何【员工】参与培训"); return(false); } this.ResultList.Add(_ListPlanCourse); this.ResultList.Add(_ListPlanUser); this.KeyWords = "【" + UniversalFunction.GetDept_Belonge(BasicInfo.DeptCode).DeptName + "】的【" + cmbYear.Text + "年" + cmbMonth.Text + "】培训计划"; return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { m_listDebitSchedule = (dataGridView1.DataSource as BindingCollection <View_S_DebitSchedule>).ToList(); ResultInfo = m_listDebitSchedule; FlowInfo_BillNo = txtSDBNo.Text; List <object> listobj = new List <object>(); listobj.Add((object)flowOperationType); listobj.Add((object)txtEditionCode.Text); listobj.Add((object)cmbApplicable.Text); ResultList = listobj; return(true); }
bool 发料清单编制主界面_Form_CommonProcessSubmit(CustomFlowForm form, string advise) { try { List <View_S_DebitSchedule> listInfo = form.ResultInfo as List <View_S_DebitSchedule>; CE_FlowOperationType flowOperationType = GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[0].ToString()); string edition = form.ResultList[1].ToString(); CE_DebitScheduleApplicable applicable = GeneralFunction.StringConvertToEnum <CE_DebitScheduleApplicable>(form.ResultList[2].ToString()); switch (flowOperationType) { case CE_FlowOperationType.提交: m_findProductOrder.SaveInfo(listInfo, form.FlowInfo_BillNo, edition, applicable); m_findProductOrder.OperationInfo(listInfo, form.FlowInfo_BillNo, edition, applicable); break; case CE_FlowOperationType.暂存: m_findProductOrder.SaveInfo(listInfo, form.FlowInfo_BillNo, edition, applicable); break; case CE_FlowOperationType.回退: break; case CE_FlowOperationType.未知: break; default: break; } if (!m_findProductOrder.IsExist(form.FlowInfo_BillNo)) { MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面"); return(false); } return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool IT运维申请单明细_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { GetInfo(); this.FlowInfo_BillNo = _LnqBillInfo.BillNo; this.ResultList = new List <object>(); this.ResultList.Add(_LnqBillInfo); this.ResultList.Add(flowOperationType); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
bool frm_CommonProcessSubmit(CustomFlowForm form, string advise) { CE_FlowOperationType tempType = GlobalObject.GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[1].ToString()); switch (tempType) { case CE_FlowOperationType.提交: if (!m_serverGoodsEntering.SubmitInfo(form.ResultList[0].ToString(), (form.ResultInfo as BindingCollection <View_S_GoodsEnteringBill>).ToList(), out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); return(false); } break; case CE_FlowOperationType.暂存: if (!m_serverGoodsEntering.EditListInfo(form.ResultList[0].ToString(), (form.ResultInfo as BindingCollection <View_S_GoodsEnteringBill>).ToList(), out m_strErr)) { MessageDialog.ShowPromptMessage(m_strErr); return(false); } break; case CE_FlowOperationType.回退: break; case CE_FlowOperationType.未知: break; default: break; } if (!m_serverGoodsEntering.IsExist(form.FlowInfo_BillNo)) { MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面"); return(false); } return(true); }
bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { m_lnqInstitution = new FM_InstitutionProcess(); if (llbFileUpLoad.Tag != null) { m_lnqInstitution.FileUnique = new Guid(llbFileUpLoad.Tag.ToString()); } m_lnqInstitution.Introductions = txtRemark.Text; m_lnqInstitution.TypeCode = UniversalFunction.GetBillPrefix(CE_BillTypeEnum.制度审查流程); m_lnqInstitution.FileName = txtFileName.Text; m_lnqInstitution.FileNo = txtFileNo.Text; m_lnqInstitution.BillNo = txtSDBNo.Text; m_lnqInstitution.BillStatus = lbSDBStatus.Text; m_lnqInstitution.SortID = txtFileSort.Tag == null ? 0 : Convert.ToInt32(txtFileSort.Tag); ResultInfo = m_lnqInstitution; return(true); }
bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { m_lnqInstitution = new FM_InstitutionProcess(); m_lnqInstitution.Introductions = txtRemark.Text; m_lnqInstitution.TypeCode = UniversalFunction.GetBillPrefix(CE_BillTypeEnum.制度销毁申请流程); m_lnqInstitution.FileName = txtFileName.Text; m_lnqInstitution.FileNo = txtFileNo.Text; m_lnqInstitution.BillNo = txtSDBNo.Text; m_lnqInstitution.BillStatus = lbSDBStatus.Text; m_lnqInstitution.FileID = (int?)txtFileNo.Tag; FM_FileList fileInfo = m_serverFileBasic.GetFile((int)m_lnqInstitution.FileID); m_lnqInstitution.FileUnique = fileInfo.FileUnique; m_lnqInstitution.SortID = fileInfo.SortID; ResultInfo = m_lnqInstitution; return(true); }
private bool TCU软件升级_Form_CommonProcessSubmit(CustomFlowForm form, string advise) { CE_FlowOperationType tempType = GlobalObject.GeneralFunction.StringConvertToEnum <CE_FlowOperationType>(form.ResultList[0].ToString()); switch (tempType) { case CE_FlowOperationType.提交: _ServiceTCU.SaveInfo_TCUSoft(form.ResultList[1] as Business_Project_TCU_SoftwareUpdate, form.ResultList[2] as List <View_Business_Project_TCU_SoftwareUpdate_DID>); _ServiceTCU.SubmitInfo_TCUSoft(form.FlowInfo_BillNo); break; case CE_FlowOperationType.暂存: _ServiceTCU.SaveInfo_TCUSoft(form.ResultList[1] as Business_Project_TCU_SoftwareUpdate, form.ResultList[2] as List <View_Business_Project_TCU_SoftwareUpdate_DID>); break; case CE_FlowOperationType.回退: break; case CE_FlowOperationType.未知: break; default: break; } if (!_ServiceTCU.IsExist(form.FlowInfo_BillNo)) { MessageDialog.ShowPromptMessage("数据为空,保存失败,如需退出,请直接X掉界面"); return(false); } return(true); }
private bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { if (flowOperationType == CE_FlowOperationType.提交 && !DataCheck()) { return(false); } BindingCollection <View_S_GoodsEnteringBill> tempList = dataGridView1.DataSource as BindingCollection <View_S_GoodsEnteringBill>; ResultInfo = tempList; FlowInfo_BillNo = txtSDBNo.Text; List <object> listobj = new List <object>(); listobj.Add((object)txtSDBNo.Text); listobj.Add((object)flowOperationType); ResultList = listobj; return(true); }
private void btnAdd_Click(object sender, EventArgs e) { object obj = Activator.CreateInstance(_Type_DetailForm); CustomFlowForm customFrm = obj as CustomFlowForm; customFrm.FlowInfo_BillNo = m_billNoControl.GetNewBillNo(); FormCommonProcess frm = new FormCommonProcess(_Enum_BillType, cmbVersion.Text, customFrm, CE_OperatorMode.添加); frm.CommonProcessSubmit += new FormCommonProcess.FormSubmit(frm_CommonProcessSubmit); m_operationType = CE_FlowOperationType.未知; if (frm.ShowDialog() != DialogResult.OK) { m_billNoControl.CancelBill(GetFlowInfo_BillNo(obj)); } else { SendMessage(); } RefreshData(tabControl1.SelectedTab); PositioningRecord(GetFlowInfo_BillNo(obj)); }
private bool customPanel1_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { if (flowOperationType == CE_FlowOperationType.提交) { if (!CheckData_Submit()) { return(false); } if (GlobalObject.GeneralFunction.StringConvertToEnum <CE_CommonBillStatus>(lbBillStatus.Text) == CE_CommonBillStatus.等待审核) { CE_ProcurementStatementBillTypeEnum billType = GlobalObject.GeneralFunction.StringConvertToEnum <CE_ProcurementStatementBillTypeEnum>(cmbBillType.Text); foreach (DataGridViewRow dgvr in customDataGridView1.Rows) { if (billType != CE_ProcurementStatementBillTypeEnum.委托加工物资) { if (Convert.ToDecimal(dgvr.Cells["入库金额"].Value) != Convert.ToDecimal(dgvr.Cells["发票金额"].Value) && dgvr.Cells["差异说明"].Value.ToString().Trim().Length == 0) { MessageDialog.ShowPromptMessage("入库金额与发票金额不一致的记录的差异说明不能为空"); return(false); } } else { decimal dcTemp = Convert.ToDecimal(dgvr.Cells["入库数量"].Value) * Convert.ToDecimal(dgvr.Cells["单件委托材料"].Value); if (Convert.ToDecimal(dgvr.Cells["入库金额"].Value) != (Convert.ToDecimal(dgvr.Cells["发票金额"].Value) + dcTemp) && dgvr.Cells["差异说明"].Value.ToString().Trim().Length == 0) { MessageDialog.ShowPromptMessage("入库金额与(发票金额 + 入库数量 * 单件委托材料) 不一致的记录的差异说明不能为空"); return(false); } } } } } else if (flowOperationType == CE_FlowOperationType.暂存) { if (!CheckData_Hold()) { return(false); } } m_lnqBillInfo = new Business_Settlement_ProcurementStatement(); m_lnqBillInfo.BillNo = txtBillNo.Text; m_lnqBillInfo.BillType = cmbBillType.Text; m_lnqBillInfo.InvoiceType = cmbInvoiceType.Text; m_lnqBillInfo.SettlementCompany = txtSettlementCompany.Tag.ToString(); m_lnqBillInfo.TaxRate = Convert.ToDecimal(cmbTaxRate.Text); m_lnqBillInfo.AccoutingDocumentNo = txtAccoutingDocumentNo.Text; List <View_Business_Settlement_ProcurementStatementDetail> listTemp = new List <View_Business_Settlement_ProcurementStatementDetail>(); foreach (DataGridViewRow dgvr in customDataGridView1.Rows) { View_Business_Settlement_ProcurementStatementDetail detailTemp = new View_Business_Settlement_ProcurementStatementDetail(); detailTemp.差异说明 = dgvr.Cells["差异说明"].Value == null ? "" : dgvr.Cells["差异说明"].Value.ToString(); detailTemp.零件名称 = dgvr.Cells["零件名称"].Value == null ? "" : dgvr.Cells["零件名称"].Value.ToString(); detailTemp.物品ID = Convert.ToInt32(dgvr.Cells["物品ID"].Value); detailTemp.零件图号 = dgvr.Cells["零件图号"].Value == null ? "" : dgvr.Cells["零件图号"].Value.ToString(); detailTemp.规格 = dgvr.Cells["规格"].Value == null ? "" : dgvr.Cells["规格"].Value.ToString(); detailTemp.单据号 = txtBillNo.Text; detailTemp.批次号 = dgvr.Cells["批次号"].Value == null ? "" : dgvr.Cells["批次号"].Value.ToString(); detailTemp.单件加工费 = (decimal?)dgvr.Cells["单件加工费"].Value; detailTemp.单件委托材料 = (decimal?)dgvr.Cells["单件委托材料"].Value; detailTemp.发票单价 = Convert.ToDecimal(dgvr.Cells["发票单价"].Value); detailTemp.发票金额 = Convert.ToDecimal(dgvr.Cells["发票金额"].Value); detailTemp.合同申请单号 = dgvr.Cells["执行合同号_申请单"].Value == null ? "" : dgvr.Cells["执行合同号_申请单"].Value.ToString(); detailTemp.价税合计 = (decimal?)dgvr.Cells["价税合计"].Value; detailTemp.入库单号 = dgvr.Cells["入库单号"].Value == null ? "" : dgvr.Cells["入库单号"].Value.ToString(); detailTemp.入库单价 = (decimal)dgvr.Cells["入库单价_不含税"].Value; detailTemp.入库金额 = (decimal)dgvr.Cells["入库金额"].Value; detailTemp.入库数量 = (decimal)dgvr.Cells["入库数量"].Value; detailTemp.税额 = (decimal)dgvr.Cells["税额"].Value; detailTemp.委托加工材料 = (decimal)dgvr.Cells["委托加工材料"].Value; listTemp.Add(detailTemp); } this.FlowInfo_BillNo = txtBillNo.Text; this.ResultInfo = m_lnqBillInfo; this.ResultList = new List <object>(); this.ResultList.Add(m_listInvoice); this.ResultList.Add(listTemp); this.ResultList.Add(flowOperationType); this.KeyWords = "【供应商】:" + m_lnqBillInfo.SettlementCompany; return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { try { if (!CheckData()) { return(false); } m_lnqBillInfo = new Business_WarehouseInPut_Requisition(); m_lnqBillInfo.BillNo = txtBillNo.Text; m_lnqBillInfo.BillType = cmbBillType.Text; m_lnqBillInfo.BillTypeDetail = txtTypeDetail.Text; m_lnqBillInfo.ApplyingDepartment = txtApplyingDepartment.Tag.ToString(); m_lnqBillInfo.IsConfirmArrival = chbIsConfirmArrival.Checked; m_lnqBillInfo.Remark = txtRemark.Text; List <View_Business_WarehouseInPut_RequisitionDetail> listTemp = new List <View_Business_WarehouseInPut_RequisitionDetail>(); foreach (DataGridViewRow dgvr in customDataGridView1.Rows) { View_Business_WarehouseInPut_RequisitionDetail detailTemp = new View_Business_WarehouseInPut_RequisitionDetail(); detailTemp.备注 = dgvr.Cells["备注"].Value == null ? "" : dgvr.Cells["备注"].Value.ToString(); detailTemp.单据号 = txtBillNo.Text; detailTemp.单位 = dgvr.Cells["单位"].Value == null ? "" : dgvr.Cells["单位"].Value.ToString(); detailTemp.供应商 = dgvr.Cells["供应商"].Value == null ? "" : dgvr.Cells["供应商"].Value.ToString(); detailTemp.关联业务 = dgvr.Cells["关联业务"].Value == null ? "" : dgvr.Cells["关联业务"].Value.ToString(); detailTemp.规格 = dgvr.Cells["规格"].Value == null ? "" : dgvr.Cells["规格"].Value.ToString(); detailTemp.检验报告 = Convert.ToBoolean(dgvr.Cells["检验报告"].Value); detailTemp.批次号 = dgvr.Cells["批次号"].Value == null ? "" : dgvr.Cells["批次号"].Value.ToString(); detailTemp.数量 = Convert.ToDecimal(dgvr.Cells["数量"].Value); detailTemp.图号型号 = dgvr.Cells["图号型号"].Value == null ? "" : dgvr.Cells["图号型号"].Value.ToString(); detailTemp.物品ID = Convert.ToInt32(dgvr.Cells["物品ID"].Value); detailTemp.物品名称 = dgvr.Cells["物品名称"].Value == null ? "" : dgvr.Cells["物品名称"].Value.ToString(); switch (GlobalObject.GeneralFunction.StringConvertToEnum <CE_InPutBusinessType>(m_lnqBillInfo.BillType)) { case CE_InPutBusinessType.生产采购: case CE_InPutBusinessType.普通采购: case CE_InPutBusinessType.委外采购: case CE_InPutBusinessType.样品采购: case CE_InPutBusinessType.自制件入库: break; case CE_InPutBusinessType.领料退库: case CE_InPutBusinessType.营销入库: case CE_InPutBusinessType.营销退库: IProductCodeServer serverProductCode = ServerModule.ServerModuleFactory.GetServerModule <IProductCodeServer>(); if (!serverProductCode.IsFitCount(detailTemp.物品ID, Convert.ToInt32(detailTemp.数量), detailTemp.单据号)) { MessageBox.Show("请对CVT/TCU设置流水编号,并保证产品数量与流水编号数一致", "提示"); return(false); } break; default: break; } listTemp.Add(detailTemp); } this.FlowInfo_BillNo = txtBillNo.Text; this.ResultInfo = listTemp; this.ResultList = new List <object>(); this.ResultList.Add(m_lnqBillInfo); this.ResultList.Add(flowOperationType); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool 重点工作明细_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { foreach (Control cl in flowLayoutPanel1.Controls) { if (cl is RadioButton) { if (!((RadioButton)cl).Checked) { continue; } RadioButton rb = cl as RadioButton; Bus_FocalWork_MonthlyProgress_Content content = rb.Tag as Bus_FocalWork_MonthlyProgress_Content; content.ProgressContent = txtProgressContent.Text; content.NextPlan = txtNextPlan.Text; if (rbYes.Checked) { content.Evaluate = "已完成"; } else if (rbNo.Checked) { content.Evaluate = "未完成"; } else if (rbDelay.Checked) { content.Evaluate = "延期"; } break; } } if (flowOperationType == CE_FlowOperationType.提交) { foreach (Bus_FocalWork_MonthlyProgress_Content content in _List_Content) { Bus_FocalWork focalWork = _Service_FocalWork.GetSingle_FocalWork(content.FocalWorkId); if (GeneralFunction.IsNullOrEmpty(content.Evaluate)) { throw new Exception("【" + focalWork.TaskName + "】,未进行评价"); } if (GeneralFunction.IsNullOrEmpty(content.NextPlan)) { throw new Exception("【" + focalWork.TaskName + "】,未填写【下月计划】"); } if (GeneralFunction.IsNullOrEmpty(content.ProgressContent)) { throw new Exception("【" + focalWork.TaskName + "】,未填写【工作进展】"); } List <Bus_FocalWork_MonthlyProgress_KeyPoint> lstTempKey = (from a in _List_KeyPoint where a.BillNo == _Lnq_BillInfo.BillNo && a.FocalWorkId == content.FocalWorkId select a).ToList(); foreach (Bus_FocalWork_MonthlyProgress_KeyPoint keyPoint in lstTempKey) { if (GeneralFunction.IsNullOrEmpty(keyPoint.Evaluate)) { Bus_FocalWork_KeyPoint tempKey = _Service_FocalWork.GetSingle_KeyPoint(keyPoint.KeyPointId); throw new Exception("【" + focalWork.TaskName + "】中的关键节点【" + tempKey.KeyPointName + "】,未进行评价"); } } } } this.FlowInfo_BillNo = _Lnq_BillInfo.BillNo; this.ResultInfo = _Lnq_BillInfo; this.ResultList = new List <object>(); this.ResultList.Add(flowOperationType); this.ResultList.Add(_List_Content); this.ResultList.Add(_List_KeyPoint); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool 创意提案明细_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { if (lbBillStatus.Text == CE_CommonBillStatus.新建单据.ToString() && !CheckData()) { return(false); } m_lnqBillInfo = new Business_CWQC_CreativePersentation(); m_lnqBillInfo.Propose = txtPropose.Tag.ToString(); m_lnqBillInfo.BillNo = txtBillNo.Text; m_lnqBillInfo.ExtensionCoverage = cmbExtensionCoverage.Text; m_lnqBillInfo.FGLD_Abstract = (int)numFGLD_Abstract.Value; m_lnqBillInfo.FGLD_Apply = (int)numFGLD_Apply.Value; m_lnqBillInfo.FGLD_Economy = (int)numFGLD_Economy.Value; m_lnqBillInfo.FGLD_Ideas = (int)numFGLD_Ideas.Value; m_lnqBillInfo.FGLD_Strive = (int)numFGLD_Strive.Value; m_lnqBillInfo.FZR_Abstract = (int)numFZR_Abstract.Value; m_lnqBillInfo.FZR_Apply = (int)numFZR_Apply.Value; m_lnqBillInfo.FZR_Economy = (int)numFZR_Economy.Value; m_lnqBillInfo.FZR_Ideas = (int)numFZR_Ideas.Value; m_lnqBillInfo.FZR_Strive = (int)numFZR_Strive.Value; m_lnqBillInfo.ImproveConditions_After = txtImproveConditions_After.Text; m_lnqBillInfo.ImproveConditions_Before = txtImproveConditions_Before.Text; m_lnqBillInfo.ImproveConditions_After_FileNo = lbImproveConditions_After_FileNo_Look.Tag == null ? null : lbImproveConditions_After_FileNo_Look.Tag.ToString(); m_lnqBillInfo.ImproveConditions_Before_FileNo = lbImproveConditions_Before_FileNo_Look.Tag == null ? null : lbImproveConditions_Before_FileNo_Look.Tag.ToString(); m_lnqBillInfo.ImproveEndDate = dtpImproveEndDate.Value; m_lnqBillInfo.ImproveStartDate = dtpImproveEndDate.Value; foreach (Control cl in customGroupBox1.Controls) { if (cl is CheckBox) { CheckBox cb = cl as CheckBox; if (cb.Checked) { m_lnqBillInfo.ProposalType += cb.Text + ","; } } } m_lnqBillInfo.ProposalType = m_lnqBillInfo.ProposalType.Substring(0, m_lnqBillInfo.ProposalType.Length - 1); m_lnqBillInfo.Task = txtTask.Text; m_lnqBillInfo.ValueEffect = Convert.ToDecimal(txtValueEffect.Text); if (lbFGLD_Level.Text != "无") { m_lnqBillInfo.SumScore = Convert.ToInt32(lbFGLD_Sum.Text); m_lnqBillInfo.Level = lbFGLD_Level.Text; m_lnqBillInfo.Bonus = Convert.ToInt32(lbFGLD_Bonus.Text); } else { m_lnqBillInfo.SumScore = Convert.ToInt32(lbFZR_Sum.Text); m_lnqBillInfo.Level = lbFZR_Level.Text; m_lnqBillInfo.Bonus = Convert.ToInt32(lbFZR_Bonus.Text); } if (lbBillStatus.Text != CE_CommonBillStatus.新建单据.ToString() && m_lnqBillInfo.SumScore == 0) { if (MessageDialog.ShowEnquiryMessage("【合计评价分】为【0分】,是否继续提交?") == DialogResult.No) { return(false); } } this.FlowInfo_BillNo = m_lnqBillInfo.BillNo; this.ResultList = new List <object>(); this.ResultList.Add(m_lnqBillInfo); this.ResultList.Add(flowOperationType); this.ResultList.Add(GetInfo_EffectValue()); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { try { if (!CheckData()) { return(false); } m_lnqBillInfo = new Business_WarehouseInPut_InPut(); m_lnqBillInfo.BillNo = txtBillNo.Text; m_lnqBillInfo.BillType = cmbBillType.Text; m_lnqBillInfo.BillTypeDetail = cmbTypeDetail.Text; m_lnqBillInfo.ApplyingDepartment = txtApplyingDepartment.Tag.ToString(); m_lnqBillInfo.StorageID = cmbStorage.SelectedValue.ToString(); m_lnqBillInfo.Remark = txtRemark.Text; List <View_Business_WarehouseInPut_InPutDetail> listTemp = new List <View_Business_WarehouseInPut_InPutDetail>(); foreach (DataGridViewRow dgvr in customDataGridView1.Rows) { View_Business_WarehouseInPut_InPutDetail detailTemp = new View_Business_WarehouseInPut_InPutDetail(); detailTemp.备注 = dgvr.Cells["备注"].Value == null ? "" : dgvr.Cells["备注"].Value.ToString(); detailTemp.单据号 = txtBillNo.Text; detailTemp.单位 = dgvr.Cells["单位"].Value == null ? "" : dgvr.Cells["单位"].Value.ToString(); detailTemp.供应商 = dgvr.Cells["供应商"].Value == null ? "" : dgvr.Cells["供应商"].Value.ToString(); detailTemp.关联业务 = dgvr.Cells["关联业务"].Value == null ? "" : dgvr.Cells["关联业务"].Value.ToString(); detailTemp.规格 = dgvr.Cells["规格"].Value == null ? "" : dgvr.Cells["规格"].Value.ToString(); detailTemp.批次号 = dgvr.Cells["批次号"].Value == null ? "" : dgvr.Cells["批次号"].Value.ToString(); detailTemp.数量 = Convert.ToDecimal(dgvr.Cells["数量"].Value); detailTemp.图号型号 = dgvr.Cells["图号型号"].Value == null ? "" : dgvr.Cells["图号型号"].Value.ToString(); detailTemp.物品ID = Convert.ToInt32(dgvr.Cells["物品ID"].Value); detailTemp.物品名称 = dgvr.Cells["物品名称"].Value == null ? "" : dgvr.Cells["物品名称"].Value.ToString(); if (detailTemp.供应商 == "") { throw new Exception(UniversalFunction.GetGoodsMessage(detailTemp.物品ID) + "批次号:【" + detailTemp.批次号 + "】,供应商为空,请选择供应商"); } switch (GlobalObject.GeneralFunction.StringConvertToEnum <CE_InPutBusinessType>(m_lnqBillInfo.BillType)) { case CE_InPutBusinessType.生产采购: case CE_InPutBusinessType.普通采购: case CE_InPutBusinessType.委外采购: case CE_InPutBusinessType.样品采购: case CE_InPutBusinessType.自制件入库: break; case CE_InPutBusinessType.领料退库: case CE_InPutBusinessType.营销入库: case CE_InPutBusinessType.营销退库: if (!m_serverProductCode.IsFitCount(detailTemp.物品ID, Convert.ToInt32(detailTemp.数量), detailTemp.单据号)) { MessageBox.Show("请对产品设置流水号,并保证产品数量与流水号数一致", "提示"); return(false); } break; default: break; } listTemp.Add(detailTemp); } this.FlowInfo_BillNo = txtBillNo.Text; this.ResultInfo = listTemp; this.ResultList = new List <object>(); this.ResultList.Add(m_lnqBillInfo); this.ResultList.Add(flowOperationType); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool 纠正预防措施报告明细_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { GetInfo(); Flow_FlowInfo info = _Service_Flow.GetNowFlowInfo(_Service_Flow.GetBusinessTypeID(CE_BillTypeEnum.纠正预防措施报告, null), _Lnq_BillInfo.BillNo); if (flowOperationType == CE_FlowOperationType.提交) { NotifyPersonnelInfo personnelInfo = new NotifyPersonnelInfo(); List <PersonnelBasicInfo> lstInfo = new List <PersonnelBasicInfo>(); PersonnelBasicInfo infoTemp = new PersonnelBasicInfo(); switch (info.FlowID) { case 1109: if (GeneralFunction.IsNullOrEmpty(_Lnq_BillInfo.D1_DutyDepartment)) { throw new Exception("请选择【调查改善担当部门】"); } break; case 1110: case 1112: IBillMessagePromulgatorServer serviceBillMessage = BasicServerFactory.GetServerModule <IBillMessagePromulgatorServer>(); List <string> lstRoleName = serviceBillMessage.GetSuperior(CE_RoleStyleType.负责人, UniversalFunction.GetDeptCode(_Lnq_BillInfo.D1_DutyDepartment)); personnelInfo.UserType = BillFlowMessage_ReceivedUserType.角色.ToString(); foreach (string item in lstRoleName) { infoTemp = new PersonnelBasicInfo(); infoTemp.角色 = item; lstInfo.Add(infoTemp); } personnelInfo.PersonnelBasicInfoList = lstInfo; this.FlowInfo_NotifyInfo = personnelInfo; break; case 1111: if (GeneralFunction.IsNullOrEmpty(_Lnq_BillInfo.D2_DutyPersonnel)) { throw new Exception("请指定【改善小组组长】"); } personnelInfo.UserType = BillFlowMessage_ReceivedUserType.用户.ToString(); infoTemp = new PersonnelBasicInfo(); infoTemp.工号 = _Lnq_BillInfo.D2_DutyPersonnel; lstInfo.Add(infoTemp); personnelInfo.PersonnelBasicInfoList = lstInfo; this.FlowInfo_NotifyInfo = personnelInfo; break; default: break; } } this.FlowInfo_BillNo = txtBillNo.Text; this.ResultInfo = _Lnq_BillInfo; this.ResultList = new List <object>(); this.ResultList.Add(flowOperationType); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { try { m_lnqBillInfo = new Business_InspectionJudge_JudgeReport(); m_lnqBillInfo.Judge = GetRadioButton_Judge(); m_lnqBillInfo.FinalJudge = GetRadioButton_FinalJudge(); if (!CheckData()) { return(false); } m_lnqBillInfo.BillNo = txtBillNo.Text; m_lnqBillInfo.IsFinalJudge = chbIsFinalJudge.Checked; m_lnqBillInfo.JudgeExplain = txtJudgeExplain.Text; m_lnqBillInfo.JudgeReportNo = txtJudgeReportNo.Text; m_lnqBillInfo.FinalJudgeExplain = txtFinalJudgeExplain.Text; List <View_Business_InspectionJudge_JudgeReport_Item> listItemTemp = new List <View_Business_InspectionJudge_JudgeReport_Item>(); foreach (DataGridViewRow dgvr in customDataGridView2.Rows) { View_Business_InspectionJudge_JudgeReport_Item itemTemp = new View_Business_InspectionJudge_JudgeReport_Item(); itemTemp.判定项目 = dgvr.Cells["判定项目"].Value == null ? "" : dgvr.Cells["判定项目"].Value.ToString(); itemTemp.判定结果 = dgvr.Cells["判定结果"].Value == null ? "" : dgvr.Cells["判定结果"].Value.ToString(); itemTemp.单据号 = txtBillNo.Text; listItemTemp.Add(itemTemp); } List <View_Business_InspectionJudge_JudgeReportDetail> listDetailTemp = new List <View_Business_InspectionJudge_JudgeReportDetail>(); foreach (DataGridViewRow dgvr in customDataGridView1.Rows) { View_Business_InspectionJudge_JudgeReportDetail detailTemp = new View_Business_InspectionJudge_JudgeReportDetail(); detailTemp.备注 = dgvr.Cells["备注"].Value == null ? "" : dgvr.Cells["备注"].Value.ToString(); detailTemp.单位 = dgvr.Cells["单位"].Value == null ? "" : dgvr.Cells["单位"].Value.ToString(); detailTemp.供应商 = dgvr.Cells["供应商"].Value == null ? "" : dgvr.Cells["供应商"].Value.ToString(); detailTemp.关联业务 = dgvr.Cells["关联业务"].Value == null ? "" : dgvr.Cells["关联业务"].Value.ToString(); detailTemp.规格 = dgvr.Cells["规格"].Value == null ? "" : dgvr.Cells["规格"].Value.ToString(); detailTemp.批次号 = dgvr.Cells["批次号"].Value == null ? "" : dgvr.Cells["批次号"].Value.ToString(); detailTemp.数量 = dgvr.Cells["数量"].Value == null ? 0 : Convert.ToDecimal(dgvr.Cells["数量"].Value); detailTemp.图号型号 = dgvr.Cells["图号型号"].Value == null ? "" : dgvr.Cells["图号型号"].Value.ToString(); detailTemp.物品ID = dgvr.Cells["物品ID"].Value == null ? 0 : Convert.ToInt32(dgvr.Cells["物品ID"].Value); detailTemp.物品名称 = dgvr.Cells["物品名称"].Value == null ? "" : dgvr.Cells["物品名称"].Value.ToString(); detailTemp.单据号 = txtBillNo.Text; listDetailTemp.Add(detailTemp); } this.FlowInfo_BillNo = txtBillNo.Text; this.ResultList = new List <object>(); this.ResultList.Add(m_lnqBillInfo); this.ResultList.Add(flowOperationType); this.ResultList.Add(listDetailTemp); this.ResultList.Add(listItemTemp); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
private bool 供应商应付账款明细_PanelGetDataInfo(CE_FlowOperationType flowOperationType) { try { if (flowOperationType == CE_FlowOperationType.提交) { if (!CheckData_Submit()) { return(false); } if (dtpFinanceTime.Value.Day > 26) { if (MessageDialog.ShowEnquiryMessage("【账单日期】大于26日,点击【是】将提交单据,点击【否】将退出?") == DialogResult.No) { return(false); } } } else if (flowOperationType == CE_FlowOperationType.暂存) { if (!CheckData_Hold()) { return(false); } } _Lnq_BillInfo = new Bus_PurchasingMG_AccountBill(); _Lnq_BillInfo.BillNo = txtBillNo.Text; _Lnq_BillInfo.Provider = txtSettlementCompany.Tag.ToString(); _Lnq_BillInfo.VoucherNo = txtVoucherNo.Text; _Lnq_BillInfo.FinanceTime = dtpFinanceTime.Value; List <View_Bus_PurchasingMG_AccountBill_Detail> listTemp = new List <View_Bus_PurchasingMG_AccountBill_Detail>(); foreach (DataGridViewRow dgvr in customDataGridView1.Rows) { View_Bus_PurchasingMG_AccountBill_Detail detailTemp = new View_Bus_PurchasingMG_AccountBill_Detail(); detailTemp.图号型号 = dgvr.Cells["图号型号"].Value == null ? "" : dgvr.Cells["图号型号"].Value.ToString(); detailTemp.物品名称 = dgvr.Cells["物品名称"].Value == null ? "" : dgvr.Cells["物品名称"].Value.ToString(); detailTemp.规格 = dgvr.Cells["规格"].Value == null ? "" : dgvr.Cells["规格"].Value.ToString(); detailTemp.GoodsID = Convert.ToInt32(dgvr.Cells["GoodsID"].Value); detailTemp.单据号 = txtBillNo.Text; detailTemp.发票金额 = Convert.ToDecimal(dgvr.Cells["发票金额"].Value); detailTemp.应付金额 = Convert.ToDecimal(dgvr.Cells["应付金额"].Value); detailTemp.应付数量 = Convert.ToDecimal(dgvr.Cells["应付数量"].Value); detailTemp.实付数量 = Convert.ToDecimal(dgvr.Cells["实付数量"].Value); detailTemp.协议单价 = Convert.ToDecimal(dgvr.Cells["协议单价"].Value); detailTemp.税率 = Convert.ToInt32(dgvr.Cells["税率"].Value); detailTemp.备注 = dgvr.Cells["备注"].Value.ToString(); detailTemp.挂账年月 = dgvr.Cells["挂账年月"].Value.ToString(); listTemp.Add(detailTemp); } this.FlowInfo_BillNo = txtBillNo.Text; this.ResultInfo = _Lnq_BillInfo; this.ResultList = new List <object>(); this.ResultList.Add(_List_Invoice); this.ResultList.Add(listTemp); this.ResultList.Add(flowOperationType); this.KeyWords = "【供应商】:" + _Lnq_BillInfo.Provider; return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }
bool CheckData(CE_FlowOperationType flowOperationType) { if (txtGoodsCode.Tag == null || txtGoodsCode.Tag.ToString().Trim().Length == 0) { MessageDialog.ShowPromptMessage("请选择【物品】"); return(false); } if (cmbStorageID.Text.Trim().Length == 0) { MessageDialog.ShowPromptMessage("请选择【所属库房】"); return(false); } if (txtBatchNo.Text.Trim().Length == 0) { MessageDialog.ShowPromptMessage("请选择【批次号】"); return(false); } if (txtIsolationReason.Text.Trim().Length == 0) { MessageDialog.ShowPromptMessage("请填写【隔离原因及处理方法】"); return(false); } if (num_PH_DisqualifiendCount.Value != 0 && !rb_ReturnProcess_BF.Checked && !rb_ReturnProcess_TH.Checked) { MessageDialog.ShowPromptMessage("不合格数大于0时,请选择【退货方式】"); return(false); } if (numGoodsCount.Value == 0) { MessageDialog.ShowPromptMessage("无法隔离【隔离数】等于0的物品"); return(false); } if (m_lnqFlowInfo != null && flowOperationType == CE_FlowOperationType.提交) { switch (m_lnqFlowInfo.FlowID) { case 58: if (num_PH_DisqualifiendCount.Value + num_PH_QualifiedCount.Value != numGoodsCount.Value) { MessageDialog.ShowPromptMessage("需满足:【合格数】+【不合格数】=【隔离数】"); return(false); } break; case 59: if (num_QC_ConcessionCount.Value + num_QC_DisqualifiedCount.Value + num_QC_QualifiedCount.Value + num_QC_ScraptCount.Value != numGoodsCount.Value) { MessageDialog.ShowPromptMessage("需满足:【合格数】+【不合格数】+【让步数】+【检测报废数】=【隔离数】"); return(false); } if (num_QC_DisqualifiedCount.Value > 0 || num_QC_QualifiedCount.Value > 0) { 合格品信息 form = new 合格品信息(m_lnqBillInfo.BillNo); form.ShowDialog(); if (!form.BlFlag) { MessageBox.Show("请完整填写不合格信息单,并且保存!", "提示"); return(false); } } break; default: break; } } return(true); }
private bool customForm_PanelGetDateInfo(CE_FlowOperationType flowOperationType) { try { if (!CheckData()) { return(false); } m_lnqBillInfo = new Business_WarehouseOutPut_WholeMachineRequisition(); m_lnqBillInfo.BillNo = txtBillNo.Text; m_lnqBillInfo.BillTypeDetail = txtPurpose.Text; m_lnqBillInfo.ProductType = txtProductType.Text.ToString(); m_lnqBillInfo.MachineCount = numRequestCount.Value; m_lnqBillInfo.Remark = txtRemark.Text; m_lnqBillInfo.IncludeAfterSupplement = chbIncludeAfterSupplement.Checked; List <View_Business_WarehouseOutPut_WholeMachineRequisitionDetail> listDetail = new List <View_Business_WarehouseOutPut_WholeMachineRequisitionDetail>(); foreach (DataGridViewRow dgvr in customDataGridView1.Rows) { View_Business_WarehouseOutPut_WholeMachineRequisitionDetail detailTemp = new View_Business_WarehouseOutPut_WholeMachineRequisitionDetail(); detailTemp.单据号 = txtBillNo.Text; detailTemp.单位 = dgvr.Cells["单位"].Value == null ? "" : dgvr.Cells["单位"].Value.ToString(); detailTemp.规格 = dgvr.Cells["规格"].Value == null ? "" : dgvr.Cells["规格"].Value.ToString(); detailTemp.数量 = Convert.ToDecimal(dgvr.Cells["数量"].Value); detailTemp.基数 = Convert.ToDecimal(dgvr.Cells["基数"].Value); detailTemp.图号型号 = dgvr.Cells["图号型号"].Value == null ? "" : dgvr.Cells["图号型号"].Value.ToString(); detailTemp.物品ID = Convert.ToInt32(dgvr.Cells["物品ID"].Value); detailTemp.物品名称 = dgvr.Cells["物品名称"].Value == null ? "" : dgvr.Cells["物品名称"].Value.ToString(); listDetail.Add(detailTemp); } List <View_Business_WarehouseOutPut_WholeMachineRequisition_StorageID> listStorage = new List <View_Business_WarehouseOutPut_WholeMachineRequisition_StorageID>(); foreach (DataGridViewRow dgvr in customDataGridView2.Rows) { View_Business_WarehouseOutPut_WholeMachineRequisition_StorageID storageTemp = new View_Business_WarehouseOutPut_WholeMachineRequisition_StorageID(); storageTemp.单据号 = txtBillNo.Text; storageTemp.库房名称 = dgvr.Cells["库房名称"].Value == null ? "" : dgvr.Cells["库房名称"].Value.ToString(); storageTemp.库房代码 = dgvr.Cells["库房代码"].Value == null ? "" : dgvr.Cells["库房代码"].Value.ToString(); storageTemp.库房顺序 = dgvr.Cells["库房顺序"].Value == null ? 0 : Convert.ToInt32(dgvr.Cells["库房顺序"].Value.ToString()); listStorage.Add(storageTemp); } this.FlowInfo_BillNo = txtBillNo.Text; this.ResultList = new List <object>(); this.ResultList.Add(m_lnqBillInfo); this.ResultList.Add(listDetail); this.ResultList.Add(listStorage); this.ResultList.Add(flowOperationType); return(true); } catch (Exception ex) { MessageDialog.ShowPromptMessage(ex.Message); return(false); } }