/// <summary> /// 修改批次 /// </summary> public void UpdateBatch() { bool flag = true; DataRow drFocus = gvAdvice.GetFocusedDataRow(); if (int.Parse(drFocus["CHECK_PIVAS_STATUS"].ToString()) != (int)(AdviceStatus)Enum.Parse(typeof(AdviceStatus), "已审", true)) { MessageBox.Show("审核状态不符合要求!"); flag = false; } string groupIndex = "0"; string frequencyName = ""; List <int> batchs = null; if (drFocus["GROUP_INDEX"].ToString() != null) { groupIndex = drFocus["GROUP_INDEX"].ToString(); } else { MessageBox.Show("请先选择一行数据!"); flag = false; } if (drFocus["FREQUENCY_NAME"].ToString() != null) { frequencyName = drFocus["FREQUENCY_NAME"].ToString(); } else { MessageBox.Show("频率为空!"); flag = false; } if (drFocus["CHECK_PIVAS_BATCH_NO"].ToString() != null) { batchs = CJia.PIVAS.Common.BatchHandle(drFocus["CHECK_PIVAS_BATCH_NO"].ToString()); } else { MessageBox.Show("批次号为空!"); flag = false; } if (flag) { CJia.PIVAS.App.UI.DataManage.EditFrequencyToBatchView editFrequencyBatch = new DataManage.EditFrequencyToBatchView(2, groupIndex, frequencyName, batchs); this.ShowAsWindow("病人信息", editFrequencyBatch); NewRefresh(); } }
//修改频率对应批次数据 private void BtnUpdate_Click(object sender, EventArgs e) { if (gridView1.FocusedRowHandle >= 0) { DataRow dr = gridView1.GetFocusedDataRow(); long frequencybatchid = long.Parse(dr["FREQUENCY_BATCH_ID"].ToString()); string frequencyName = dr["FREQUENCY_NAME"].ToString(); string batchs = dr["BATCHS_NAME"].ToString(); List <int> ListBatch = CJia.PIVAS.Common.BatchHandle(batchs); EditFrequencyToBatchView editFrequency = new EditFrequencyToBatchView(1, frequencybatchid, frequencyName, CJia.PIVAS.Common.BatchHandle(batchs)); ShowAsWindow("修改频率对应批次", editFrequency); this.OnLoadData(null, null); } else { CJia.PIVAS.Tools.Message.Show("请选则数据"); } }
/// <summary> /// 修改批次 /// </summary> public void UpdateBatch() { DataRow drFocus = gvAdvice.GetFocusedDataRow(); if (drFocus["STANDING_FLAG"].ToString() == "0") { Message.Show("临时医嘱不能修改批次!"); return; } MouseFocusParam(); checkAdviceArgs.OriginalPivasStatus = GetOriginalCheckStatus(); if (checkAdviceArgs.OriginalPivasStatus == 1000101) { checkAdviceArgs.CheckPivasStatus = (int)(AdviceStatus)Enum.Parse(typeof(AdviceStatus), "已审", true); if (OnInsertCheck != null) { OnInsertCheck(null, checkAdviceArgs); } checkAdviceArgs.CheckPivasStatus = (int)(AdviceStatus)Enum.Parse(typeof(AdviceStatus), "待审", true); if (OnCancelCheck != null) { OnCancelCheck(null, checkAdviceArgs); } } bool flag = true; //if (int.Parse(drFocus["CHECK_PIVAS_STATUS"].ToString()) != (int)(AdviceStatus)Enum.Parse(typeof(AdviceStatus), "已审", true)) //{ // Message.Show("审核状态不符合要求!"); // flag = false; //} string groupIndex = "0"; string frequencyName = ""; string illfieldId = ""; List <string> batchs = null; if (drFocus["GROUP_INDEX"].ToString() != null) { groupIndex = drFocus["GROUP_INDEX"].ToString(); } else { Message.Show("请先选择一行数据!"); flag = false; } if (drFocus["FREQUENCY_NAME"].ToString() != null) { frequencyName = drFocus["FREQUENCY_NAME"].ToString(); } else { Message.Show("频率为空!"); flag = false; } illfieldId = drFocus["PATIENT_ILLFILED_CODE"].ToString(); if (drFocus["CHECK_PIVAS_BATCH_NO"].ToString() != null) { batchs = CJia.PIVAS.Common.BatchHandle(drFocus["CHECK_PIVAS_BATCH_NO"].ToString()); } else { Message.Show("批次号为空!"); flag = false; } if (flag) { CJia.PIVAS.App.UI.DataManage.EditFrequencyToBatchView editFrequencyBatch = new DataManage.EditFrequencyToBatchView(2, groupIndex, frequencyName, illfieldId, batchs); this.ShowAsWindow("修改批次", editFrequencyBatch); NewRefresh(); } }