Exemplo n.º 1
0
        /// <summary>
        /// 查询所属单据
        /// </summary>
        private void m_FillOwnerUsage(string p_strUsageID, int p_intTypeindex)
        {
            clsDomainControl_ChargeItem objsvc = new clsDomainControl_ChargeItem();
            DataTable dt  = new DataTable();
            long      res = objsvc.m_lngGetData("SELECT * FROM t_opr_setusage t1,t_bse_nurseorder t2 where t1.orderid_vchr=t2.orderid_int(+)  and t1.TYPE_INT=" + p_intTypeindex.ToString() + " and t1.USAGEID_CHR='" + p_strUsageID + "'", out dt);

            if (res > 0)
            {
                m_mthBindListViewByDataTable(dt, this.m_lsvUse);
            }

            #region bak
//			string[] strID = p_strOrderIdGroup.Split('|');
//			string[] strName = p_strUSAGEOrderName.Split(',');
//			ListViewItem li = null;
//			for(int i1=0;i1<strName.Length;i1++)
//			{
//				if(strID[i1] != "")
//				{
//					li = new ListViewItem(strID[i1]);//单据ID
//					li.SubItems.Add(strName[i1]);
//					this.m_lsvUse .Items.Add(li);
//				}
//			}
//			if(m_lsvUse.Items.Count>0)
//			{
//				m_lsvUse.HideSelection = false;
//				m_lsvUse.Items[0].Selected=true;
//			}
            #endregion
        }
Exemplo n.º 2
0
        /// <summary>
        /// 解释单据名称
        /// </summary>
        /// <param name="p_strorderid"></param>
        /// <returns></returns>
        private string m_strJieOrderName(string p_strorderid)
        {
            string strResult = "";

            if (p_strorderid != "")
            {
                string[] str = p_strorderid.Split('|');
                clsDomainControl_ChargeItem objsvc = new clsDomainControl_ChargeItem();
                DataTable dt  = new DataTable();
                long      res = objsvc.m_lngGetData("SELECT ORDERID_INT,ORDERNAME_VCHR FROM t_bse_nurseorder", out dt);
                if (res > 0)
                {
                    for (int i = 0; i < str.Length; ++i)
                    {
                        for (int i2 = 0; i2 < dt.Rows.Count; ++i2)
                        {
                            if (str[i].Trim() == dt.Rows[i2]["ORDERID_INT"].ToString().Trim())
                            {
                                strResult += dt.Rows[i2]["ORDERNAME_VCHR"].ToString().Trim() + ",";
                                break;
                            }
                        }
                    }
                }
            }
            if (strResult.EndsWith(","))
            {
                strResult = strResult.Substring(0, strResult.Length - 1);
            }
            return(strResult);
        }
Exemplo n.º 3
0
        private DataTable m_mthGetDataFromTypeId(int p_intTypeId)
        {
            clsDomainControl_ChargeItem objsvc = new clsDomainControl_ChargeItem();
            DataTable dt  = new DataTable();
            long      res = objsvc.m_lngGetData("SELECT * FROM t_opr_setusage t1,t_bse_nurseorder t2 where t1.orderid_vchr=t2.orderid_int(+)  and t1.TYPE_INT=" + p_intTypeId.ToString(), out dt);

            if (res > 0)
            {
                return(dt);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 4
0
 private void frmRelationship_Load(object sender, EventArgs e)
 {
     if (strITEMID_CHR != "")
     {
         clsDomainControl_ChargeItem objsvc = new clsDomainControl_ChargeItem();
         DataTable dt  = new DataTable();
         long      res = objsvc.m_lngGetData(@"SELECT   a.itemcode_vchr as 项目编码, trim(a.itemname_vchr) as 项目名称, a.itemspec_vchr as 项目规格,a.ITEMUNIT_CHR as 项目单位,
                                      a.itemprice_mny as 项目价格 ,a.PDCAREA_VCHR as 产地
                                              FROM t_bse_chargeitem a, t_bse_subchargeitem b
                                              WHERE b.ITEMID_CHR = a.itemid_chr AND b.subitemid_chr = '" + strITEMID_CHR + @"'
                                                 ORDER BY a.itemcode_vchr", out dt);
         if (res > 0)
         {
             dataGridView1.DataSource = dt;
         }
     }
 }