private void btnReAuditing_Click(object sender, EventArgs e) { try { if (this.BillNo != null) { if (m_serverFlow.GetNowBillStatus(this.BillNo) == "单据完成") { Flow_FlowData flowData = m_serverFlow.GetBusinessOperationInfo(this.BillNo).OrderByDescending(k => k.OperationTime).First(); if (UniversalFunction.GetYearAndMonth(ServerTime.Time) != UniversalFunction.GetYearAndMonth(flowData.OperationTime)) { MessageDialog.ShowPromptMessage("无法【重审】非当月单据"); return; } if (MessageDialog.ShowEnquiryMessage("确定要重审【" + this.BillNo + "】号单据?") == DialogResult.Yes) { m_serverFlow.FlowReback_Finish(this.BillNo, "重审 ", "", 37, null); MessageDialog.ShowPromptMessage("已可以重审【" + this.BillNo + "】号单据"); this.RefreshData(this.tabControl1.SelectedTab); this.PositioningRecord(this.BillNo.ToString()); return; } } else { MessageDialog.ShowPromptMessage("只能重审已完成的单据"); return; } } } catch (Exception ex) { MessageDialog.ShowErrorMessage(ex.Message); return; } }
void SetInfo() { IFlowServer serverFlow = FlowControlService.ServerModuleFactory.GetServerModule <IFlowServer>(); dataGridView1.DataSource = m_mainService.GetReferenceInfo(dataGridView1.Tag.ToString()); dataGridView2.DataSource = m_mainService.GetReferenceInfo(dataGridView2.Tag.ToString()); dataGridView3.DataSource = m_mainService.GetReferenceInfo(dataGridView3.Tag.ToString()); if (m_lnqBillInfo != null) { lbBillStatus.Text = serverFlow.GetNowBillStatus(m_lnqBillInfo.BillNo); txtBillNo.Text = m_lnqBillInfo.BillNo; Flow_FlowInfo flowInfo = serverFlow.GetNowFlowInfo(serverFlow.GetBusinessTypeID(CE_BillTypeEnum.创意提案, null), m_lnqBillInfo.BillNo); Flow_FlowData flowData = serverFlow.GetBusinessOperationInfo(txtBillNo.Text, CE_CommonBillStatus.新建单据.ToString())[0]; View_HR_Personnel sqrInfo = UniversalFunction.GetPersonnelInfo(m_lnqBillInfo.Propose); txtDept.Text = sqrInfo.部门名称; txtPropose.Text = sqrInfo.姓名; txtPropose.Tag = sqrInfo.工号; txtImproveConditions_After.Text = m_lnqBillInfo.ImproveConditions_After; txtImproveConditions_Before.Text = m_lnqBillInfo.ImproveConditions_Before; txtTask.Text = m_lnqBillInfo.Task; dtpImproveEndDate.Value = m_lnqBillInfo.ImproveEndDate; dtpImproveStartDate.Value = m_lnqBillInfo.ImproveStartDate; cmbExtensionCoverage.Text = m_lnqBillInfo.ExtensionCoverage; txtValueEffect.Text = m_lnqBillInfo.ValueEffect.ToString(); numFGLD_Abstract.Value = m_lnqBillInfo.FGLD_Abstract == null ? 0 : (int)m_lnqBillInfo.FGLD_Abstract; numFGLD_Apply.Value = m_lnqBillInfo.FGLD_Apply == null ? 0 : (int)m_lnqBillInfo.FGLD_Apply; numFGLD_Economy.Value = m_lnqBillInfo.FGLD_Economy == null ? 0 : (int)m_lnqBillInfo.FGLD_Economy; numFGLD_Ideas.Value = m_lnqBillInfo.FGLD_Ideas == null ? 0 : (int)m_lnqBillInfo.FGLD_Ideas; numFGLD_Strive.Value = m_lnqBillInfo.FGLD_Strive == null ? 0 : (int)m_lnqBillInfo.FGLD_Strive; numFZR_Abstract.Value = m_lnqBillInfo.FZR_Abstract == null ? 0 : (int)m_lnqBillInfo.FZR_Abstract; numFZR_Apply.Value = m_lnqBillInfo.FZR_Apply == null ? 0 : (int)m_lnqBillInfo.FZR_Apply; numFZR_Economy.Value = m_lnqBillInfo.FZR_Economy == null ? 0 : (int)m_lnqBillInfo.FZR_Economy; numFZR_Ideas.Value = m_lnqBillInfo.FZR_Ideas == null ? 0 : (int)m_lnqBillInfo.FZR_Ideas; numFZR_Strive.Value = m_lnqBillInfo.FZR_Strive == null ? 0 : (int)m_lnqBillInfo.FZR_Strive; lbImproveConditions_After_FileNo_Look.Tag = m_lnqBillInfo.ImproveConditions_After_FileNo; lbImproveConditions_Before_FileNo_Look.Tag = m_lnqBillInfo.ImproveConditions_Before_FileNo; List <string> lstCheck = m_lnqBillInfo.ProposalType.Split(',').ToList(); foreach (Control cl in customGroupBox1.Controls) { if (cl is CheckBox) { CheckBox cb = cl as CheckBox; if (lstCheck.Contains(cb.Text)) { cb.Checked = true; } } } foreach (Control cl in tabPage1.Controls) { if (cl is CustomGroupBox) { CustomGroupBox gb = cl as CustomGroupBox; if (gb.Tag != null && gb.Tag.ToString().Trim().Length > 0) { if (flowInfo.FlowID == Convert.ToInt32(gb.Tag)) { gb.Enabled = true; } else { gb.Enabled = false; } } } } if (lbBillStatus.Text != CE_CommonBillStatus.新建单据.ToString()) { txtImproveConditions_After.ReadOnly = true; txtImproveConditions_Before.ReadOnly = true; } } else { lbBillStatus.Text = CE_CommonBillStatus.新建单据.ToString(); m_lnqBillInfo = new Business_CWQC_CreativePersentation(); txtBillNo.Text = this.FlowInfo_BillNo; m_lnqBillInfo.BillNo = txtBillNo.Text; View_HR_Personnel sqrInfo = UniversalFunction.GetPersonnelInfo(BasicInfo.LoginID); txtDept.Text = sqrInfo.部门名称; txtPropose.Text = sqrInfo.姓名; txtPropose.Tag = sqrInfo.工号; if (!isDirectAdd) { customGroupBox6.Enabled = false; customGroupBox7.Enabled = false; } } if (lbBillStatus.Text == CE_CommonBillStatus.新建单据.ToString()) { lbImproveConditions_After_FileNo_Up.Visible = true; lbImproveConditions_Before_FileNo_Up.Visible = true; } else { lbImproveConditions_After_FileNo_Up.Visible = false; lbImproveConditions_Before_FileNo_Up.Visible = false; } if (lbImproveConditions_After_FileNo_Look.Tag != null && lbImproveConditions_After_FileNo_Look.Tag.ToString().Trim().Length > 0) { lbImproveConditions_After_FileNo_Look.Visible = true; } else { lbImproveConditions_After_FileNo_Look.Visible = false; } if (lbImproveConditions_Before_FileNo_Look.Tag != null && lbImproveConditions_Before_FileNo_Look.Tag.ToString().Trim().Length > 0) { lbImproveConditions_Before_FileNo_Look.Visible = true; } else { lbImproveConditions_Before_FileNo_Look.Visible = false; } FZRSetInfo(); FGLDSetInfo(); SetInfo_EffectValue(); }