Ejemplo n.º 1
0
        private bool GetTheTextOrder(ref clsBIHOrderDic orderDic)
        {
            if (txtInfo.Text.Trim().Equals(""))
            {
                MessageBox.Show("内容不能为空!", "提示框!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtInfo.Focus();
                return(false);
            }
            if (txtInfo.Tag is clsBIHOrderDic)
            {
                orderDic = (clsBIHOrderDic)txtInfo.Tag;
            }
            else
            {
                if (m_strORDERCATEID_CHR.Trim().Equals(""))
                {
                    MessageBox.Show("请先选择文字医嘱类别!", "提示框!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return(false);
                }
                //clsBIHOrderService m_objService = com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(clsBIHOrderService)) as clsBIHOrderService;
                clsBIHOrderService m_objService = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
                clsBIHOrderDic[]   arrDic;
                m_objService.m_lngGetOrderDicChargeByCode("", m_intClass, m_strORDERCATEID_CHR, false, this.m_strMedDeptId, out arrDic, out m_dsDicChargeSet, this.isChildPrice);
                //m_objService.m_lngGetOrderDicChargeByCode("", m_intClass, m_strORDERCATEID_CHR, false, out arrDic, out m_dsDicChargeSet);
                if (arrDic != null && arrDic.Length > 0)
                {
                    orderDic = arrDic[0];
                }
            }

            orderDic.m_strName = txtInfo.Text;
            return(true);
        }
Ejemplo n.º 2
0
        private void buttonXP2_Click(object sender, EventArgs e)
        {
            m_lviSItem = new ListViewItem();
            clsBIHOrderDic orderDic = new clsBIHOrderDic();

            if (GetTheTextOrder(ref orderDic) == false)
            {
                return;
            }
            //if (m_lvwList.SelectedItems.Count > 0)
            //{
            //    orderDic = (clsBIHOrderDic)m_lvwList.SelectedItems[0].Tag;
            //}
            //else
            //{
            //   orderDic.m_strOrderCateID=m_strORDERCATEID_CHR;
            //}

            m_lviSItem.Tag    = orderDic;
            this.DialogResult = DialogResult.OK;
        }
Ejemplo n.º 3
0
        private void buttonXP1_Click(object sender, EventArgs e)
        {
            if (m_lvwList.SelectedItems.Count <= 0 && this.m_plTextOrder.Visible == false)
            {
                return;
            }
            else
            {
                if (m_lvwList.SelectedItems.Count > 0)
                {
                    if (((clsBIHOrderDic)m_lvwList.SelectedItems[0].Tag).m_strDesc.Trim().Equals("*"))
                    {
                        return;
                    }
                    if (m_blDeableMedControl == false)
                    {
                        if (((clsBIHOrderDic)m_lvwList.SelectedItems[0].Tag).m_intIPNOQTYFLAG_INT == 1)
                        {
                            MessageBox.Show("不能选择缺药的项!", "提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning);

                            return;
                        }
                    }
                    //记录是否是药品
                    this.m_intITEMSRCTYPE_INT = ((clsBIHOrderDic)m_lvwList.SelectedItems[0].Tag).m_intITEMSRCTYPE_INT;

                    //库存量(求和后计算)
                    int intOrderdicChargeCount = m_dtvOrderdicCharge.RowCount;
                    for (int intI1 = 0; intI1 < intOrderdicChargeCount; intI1++)
                    {
                        this.m_dmlOpcurrentgross_num += Convert.ToSingle(m_dtvOrderdicCharge.Rows[intI1].Cells["QTY_INT"].Value.ToString());
                    }
                    if (m_blStopControl == false)
                    {
                        bool m_blCheck = false;
                        if (m_dsDicChargeSet != null && m_dsDicChargeSet.Tables.Count > 0)
                        {
                            DataView myDataView = m_dsDicChargeSet.Tables[0].DefaultView;
                            myDataView.RowFilter = "orderdicid_chr='" + ((clsBIHOrderDic)m_lvwList.SelectedItems[0].Tag).m_strOrderDicID + "'";
                            m_blCheck            = CheckTheStopCharge(myDataView);
                        }
                        if (m_blCheck)
                        {
                            MessageBox.Show("不能选择已停用收费项目!", "提示!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                            return;
                        }
                    }
                }
                //更新到文字医嘱输入框
                if (this.m_plTextOrder.Visible == true)
                {
                    //if (this.txtInfo.Text.Trim().Equals(""))
                    //{
                    //    return;
                    //}
                    //m_lviSItem = new ListViewItem();
                    //clsBIHOrderDic orderDic = new clsBIHOrderDic();
                    //if (m_lvwList.SelectedItems.Count > 0)
                    //{
                    //    orderDic = (clsBIHOrderDic)m_lvwList.SelectedItems[0].Tag;
                    //}
                    //else
                    //{
                    //    orderDic.m_strOrderCateID = m_strORDERCATEID_CHR;
                    //}
                    //orderDic.m_strName = txtInfo.Text;
                    //m_lviSItem.Tag = orderDic;

                    //m_lviSItemArr = new ListViewItem[1];
                    //m_lviSItemArr[0] = m_lviSItem;
                    clsBIHOrderDic orderDic = new clsBIHOrderDic();
                    if (GetTheTextOrder(ref orderDic) == false)
                    {
                        return;
                    }
                    m_lviSItem       = new ListViewItem();
                    m_lviSItem.Tag   = orderDic;
                    m_lviSItemArr    = new ListViewItem[1];
                    m_lviSItemArr[0] = m_lviSItem;
                }
                else
                {
                    m_lviSItemArr = new ListViewItem[m_lvwList.SelectedItems.Count];
                    for (int i = 0; i < m_lvwList.SelectedItems.Count; i++)
                    {
                        m_lviSItemArr[i] = m_lvwList.SelectedItems[i];
                    }
                }
                this.DialogResult = DialogResult.Yes;
            }
        }