/// <summary> /// 应对风险保存按钮 /// Updated:20170414(Xuxb)保存后刷新首页风险图表 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave3_Click(object sender, EventArgs e) { if (ID == null) { MessageBox.Show("请先保存识别风险!"); return; } DomainDLL.Risk risk = bll.Get(ID); ComboItem cbi = (ComboItem)cmbHandleType.SelectedItem; if (cbi != null) { risk.HandleType = Convert.ToInt32(cbi.Value); } risk.HandleDesc = txtHandleDesc.Text.ToString(); risk.HandleDate = dtiHandleDate.Value; JsonResult json = bll.SaveRisk(risk, out ID); MessageHelper.ShowRstMsg(json.result); if (json.result) { btnClear3_Click(null, null); } DataBind(null, null); //重新加载首页的风险列表 startPage.LoadProjectRisk(); }
/// <summary> /// 识别风险点击保存 /// Updated:20170414(Xuxb)保存后刷新首页风险图表 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave1_Click(object sender, EventArgs e) { DomainDLL.Risk risk = bll.Get(ID); risk.Source = cmbtSource.SelectedNode.Name; risk.Name = txtName.Text.ToString(); risk.Desc = txtDesc.Text.ToString(); risk.FindDate = dtiFindDate.Value; risk.ID = ID; risk.PID = ProjectId; JsonResult json = bll.SaveRisk(risk, out ID); MessageHelper.ShowRstMsg(json.result); if (json.result) { btnClear1_Click(null, null); } DataBind(null, null); //重新加载首页的风险列表 startPage.LoadProjectRisk(); }
/// <summary> /// 评估风险保存按钮点击事件 /// Updated:20170414(Xuxb)保存后刷新首页风险图表 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave2_Click(object sender, EventArgs e) { if (ID == null) { MessageBox.Show("请先保存识别风险!"); return; } DomainDLL.Risk risk = bll.Get(ID); ComboItem cbi = (ComboItem)cmbLevel.SelectedItem; if (cbi != null) { risk.Level = Convert.ToInt32(cbi.Value); } risk.CostTime = txtCostTime.Text.ToString(); //risk.Dependency = cmbtDepenency.SelectedNode.Name; risk.Dependency = txtDependency.Tag.ToString(); ComboItem cbi1 = (ComboItem)cmbProbability.SelectedItem; if (cbi != null) { risk.Probability = Convert.ToInt32(cbi1.Value); } risk.AssessDesc = txtAcessDesc.Text.ToString(); risk.AssessDate = dtiAccessDesc.Value; risk.ID = ID; JsonResult json = bll.SaveRisk(risk, out ID); MessageHelper.ShowRstMsg(json.result); if (json.result) { btnClear2_Click(null, null); } DataBind(null, null); //重新加载首页的风险列表 startPage.LoadProjectRisk(); }