Ejemplo n.º 1
0
        /// <summary>
        /// 获得检验设备

        /// </summary>
        private void m_mthGetCheckItem()
        {
            if (this.comboBox1.Tag == null || this.comboBox1.SelectedIndex < 0)
            {
                return;
            }

            this.txtCheckItem.Text = "";
            this.listView3.Items.Clear();
            string strCategoryID = "";

            if (this.comboBox1.SelectedIndex >= 0)
            {
                strCategoryID = ((clsCheckCategory_VO[])this.comboBox1.Tag)[this.comboBox1.SelectedIndex].m_strCheck_Category_ID;
            }
            clsCheckItem_VO[] objResultArr = null;

            long lngRes = objDomain.m_lngGetCheckItemByCategoryID(strCategoryID, out objResultArr);

            if ((lngRes > 0) && (objResultArr != null))
            {
                if (objResultArr.Length > 0)
                {
                    ListViewItem lviItem = null;

                    for (int i1 = 0; i1 < objResultArr.Length; i1++)
                    {
                        lviItem = new ListViewItem(objResultArr[i1].m_strCheck_Item_Name);
                        lviItem.SubItems.Add(objResultArr[i1].m_strCheck_Item_English_Name);
                        lviItem.SubItems.Add(objResultArr[i1].m_strShortName);
                        lviItem.Tag = objResultArr[i1];
                        this.listView3.Items.Add(lviItem);
                    }
                }
                else
                {
                    this.listView3.Items.Clear();
                }
            }
        }