public void m_mthClear() { m_objViewer.m_lsvSampleList.Items.Clear(); m_objViewer.m_lsvSampleResult.Items.Clear(); m_objViewer.m_lsvResultUnite.Items.Clear(); m_objViewer.m_txtDeviceSampleID.Clear(); m_objResultLog = null; m_objViewer.m_txtDeviceSampleID.Focus(); // if(m_objViewer.m_cboDeviceModel.Items.Count > 0) // { // m_objViewer.m_cboDeviceModel.SelectedIndex = 0; // } // m_objViewer.m_dtpCheckDate.Value = System.DateTime.Now; }
public void m_mthSetToBaseSample() { if (m_objViewer.m_lsvSampleList.SelectedItems.Count <= 0) { return; } clsResultLogVO objTemp = (clsResultLogVO)m_objViewer.m_lsvSampleList.SelectedItems[0].Tag; // if(objTemp.m_strSample_status != "3" && objTemp.m_strSample_status != "5" && objTemp.m_strSample_status != "") // { // MessageBox.Show("该数据不能设为基准样本!"); // return; // } m_objViewer.m_lsvResultUnite.Items.Clear(); for (int i = 0; i < m_objViewer.m_lsvSampleList.Items.Count; i++) { m_objViewer.m_lsvSampleList.Items[i].SubItems[2].Text = ""; } m_objResultLog = (clsResultLogVO)m_objViewer.m_lsvSampleList.SelectedItems[0].Tag; m_objViewer.m_lsvSampleList.SelectedItems[0].SubItems[2].Text = "←"; // m_objResultLog.m_strUseFlag = "1"; long lngRes = 0; clsDeviceReslutVO[] objResultArr = null; lngRes = m_objManage.m_lngGetDeviceData(m_objResultLog.m_strDeviceID, m_objResultLog.m_strDeviceSampleID, m_objResultLog.m_strCheckDat, int.Parse(m_objResultLog.m_strBeginIndex), int.Parse(m_objResultLog.m_strEndIndex), out objResultArr); if (lngRes > 0 && objResultArr != null && objResultArr.Length > 0) { for (int i = 0; i < objResultArr.Length; i++) { ListViewItem objlsvItem = new ListViewItem(); objlsvItem.Text = objResultArr[i].m_strDeviceCheckItemName; objlsvItem.SubItems.Add(objResultArr[i].m_strResult); objlsvItem.Tag = objResultArr[i]; m_objViewer.m_lsvResultUnite.Items.Add(objlsvItem); } } }
public void m_mthCancel() { for (int i = 0; i < m_objViewer.m_lsvSampleList.Items.Count; i++) { if (m_objViewer.m_lsvSampleList.Items[i].SubItems[2].Text.ToString().Trim() != "") { m_objViewer.m_lsvResultUnite.Items.Clear(); m_objResultLog = (clsResultLogVO)m_objViewer.m_lsvSampleList.Items[i].Tag; // m_objResultLog.m_strUseFlag = "1"; long lngRes = 0; clsDeviceReslutVO[] objResultArr = null; lngRes = m_objManage.m_lngGetDeviceData(m_objResultLog.m_strDeviceID, m_objResultLog.m_strDeviceSampleID, m_objResultLog.m_strCheckDat, int.Parse(m_objResultLog.m_strBeginIndex), int.Parse(m_objResultLog.m_strEndIndex), out objResultArr); if (lngRes > 0 && objResultArr != null && objResultArr.Length > 0) { for (int j = 0; j < objResultArr.Length; j++) { ListViewItem objlsvItem = new ListViewItem(); objlsvItem.Text = objResultArr[j].m_strDeviceCheckItemName; objlsvItem.SubItems.Add(objResultArr[j].m_strResult); objlsvItem.Tag = objResultArr[j]; m_objViewer.m_lsvResultUnite.Items.Add(objlsvItem); } } break; } } if (m_objViewer.m_lsvSampleResult.Items.Count > 0) { for (int i = 0; i < m_objViewer.m_lsvSampleResult.Items.Count; i++) { m_objViewer.m_lsvSampleResult.Items[i].Checked = false; } } }