Exemplo n.º 1
0
        public void m_GetItemByUsageID()
        {
            m_objViewer.m_lvw.Items.Clear();
            clsChargeItem_VO[] objResult;
            string             strID = m_objViewer.m_cboUsage.SelectItemValue;

            if (strID == "")
            {
                return;
            }
            long lngRes = clsDomain.m_lngFindItemByUsageID(strID, out objResult);

            if (lngRes > 0 && objResult.Length > 0)
            {
                ListViewItem lvw;
                for (int i1 = 0; i1 < objResult.Length; i1++)
                {
                    lvw     = new ListViewItem(objResult[i1].m_strItemName);
                    lvw.Tag = objResult[i1].m_strItemID;
                    m_objViewer.m_lvw.Items.Add(lvw);
                }
            }
            if (m_objViewer.m_lvw.Items.Count > 0)
            {
                m_objViewer.m_lvw.Items[0].Selected = true;
            }
        }
Exemplo n.º 2
0
        private void m_mthFillItem(string strID)
        {
            com.digitalwave.iCare.ValueObject.clsChargeItem_VO[] objResult = null;
            long lngRes = clsDomain.m_lngFindItemByUsageID(strID, out objResult);

            this.listView2.Items.Clear();
            if ((lngRes > 0) && (objResult != null))
            {
                for (int i = 0; i < objResult.Length; i++)
                {
                    ListViewItem lv = new ListViewItem(objResult[i].m_strItemCode);
                    lv.SubItems.Add(objResult[i].m_strItemName);
                    lv.SubItems.Add(objResult[i].m_strItemSpec);
                    lv.SubItems.Add(objResult[i].m_fltItemPrice.ToString());
                    lv.SubItems.Add(objResult[i].m_strUNITPRICE);
                    lv.SubItems.Add(objResult[i].m_strItemID);
                    string strTemp = m_mthRelationInfo(objResult[i].m_ItemOPInvType.m_strTypeID);
                    lv.Checked = true;
                    if (strTemp == "0001" || strTemp == "0002")
                    {
//						strTemp ="";
                        if (objResult[i].m_strINSURANCEID_CHR.Trim() != "0")
                        {
                            lv.ForeColor = System.Drawing.Color.Red;
//							strTemp ="缺药";
                            lv.Checked = false;
                        }
                    }
                    if (objResult[i].m_intIFSTOP_INT != 0)
                    {
                        lv.ForeColor = System.Drawing.Color.Gray;
                        lv.Checked   = false;
                    }
                    lv.Tag = objResult[i];
                    this.listView2.Items.Add(lv);
                }
            }
        }