Exemplo n.º 1
0
 private void ShowDrugInfo()
 {
     try
     {
         this.txtDgName.Text        = _currentOrder.MakerDic.DrugInfo.chemname;
         this.txtDgSpec.Text        = _currentOrder.MakerDic.DrugInfo.spec;
         this.txtProduct.Text       = _currentOrder.MakerDic.DrugInfo.productname;
         this.txtRetailPrice.Text   = _currentOrder.RetailPrice.ToString();
         this.txtTradePrice.Text    = _currentOrder.TradePrice.ToString();
         this.txtDefStockPrice.Text = _currentOrder.MakerDic.DefStockPrice.ToString();
         this.txtStockPrice.Text    = _currentOrder.StockPrice.ToString();
         decimal currentNum = 0;
         if (_belongSystem == ConfigManager.YF_SYSTEM)
         {
             currentNum = _storeQuery.QueryNum(_currentOrder.MakerDicID, _currentOrder.DeptID);
             if (currentNum < 0)
             {
                 currentNum = 0;
             }
             this.txtSmallUnit.Text = _currentOrder.LeastUnitEntity.UnitName;
         }
         else
         {
             currentNum            = _storeQuery.QueryNum(_currentOrder.MakerDicID, _currentOrder.DeptID);
             this.txtPackUnit.Text = _currentOrder.LeastUnitEntity.UnitName;
         }
         this.txtCurrentNum.Text    = currentNum.ToString("0.00");
         this.cobValidityDate.Value = _currentOrder.ValidityDate;
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemplo n.º 2
0
        private void ShowDrugInfo()
        {
            this.txtDgName.Text      = _currentOrder.MakerDic.DrugInfo.chemname;
            this.txtDgSpec.Text      = _currentOrder.MakerDic.DrugInfo.spec;
            this.txtProduct.Text     = _currentOrder.MakerDic.DrugInfo.productname;
            this.txtRetailPrice.Text = _currentOrder.RetailPrice.ToString();
            this.txtTradePrice.Text  = _currentOrder.TradePrice.ToString();
            this.txtPackUnit.Text    = _currentOrder.LeastUnitEntity.UnitName;

            if (_belongSystem == ConfigManager.YK_SYSTEM)
            {
                this.txtCurrentStore.Text = _storQuery.QueryNum(_currentOrder.MakerDicID, (int)_currentDeptId).ToString("0.00");
            }
            else if (_belongSystem == ConfigManager.YF_SYSTEM)
            {
                decimal currentNum = _storQuery.QueryNum(_currentOrder.MakerDicID, _currentMaster.DeptID)
                                     / _currentOrder.UnitNum;
                if (currentNum < 0)
                {
                    currentNum = 0;
                }
                this.txtCurrentStore.Text = currentNum.ToString("0.00");
            }
        }
Exemplo n.º 3
0
        private string CheckDrugStore()
        {
            StoreQuery storeQuery = null;
            string     rtn        = "";

            if (_currentMaker != null)
            {
                if (_currentMaker.GetWay == 1)
                {
                    DataTable allDrugDept = DrugBaseDataBll.LoadAllDrugDept();
                    for (int index = 0; index < allDrugDept.Rows.Count; index++)
                    {
                        int    deptId   = Convert.ToInt32(allDrugDept.Rows[index]["DEPTID"]);
                        string deptName = allDrugDept.Rows[index]["DEPTNAME"].ToString();
                        if (allDrugDept.Rows[index]["DEPTTYPE1"].ToString() == "药房")
                        {
                            storeQuery = StoreFactory.GetQuery(ConfigManager.YF_SYSTEM);
                        }
                        else
                        {
                            storeQuery = StoreFactory.GetQuery(ConfigManager.YK_SYSTEM);
                        }
                        decimal currentNum = storeQuery.QueryNum(_currentMaker.MakerDicID, deptId);
                        if (currentNum > 0)
                        {
                            rtn += ("[" + deptName.Trim() + "数量:" + currentNum.ToString("0.00") + "]" + "\n");
                        }
                    }
                    if (rtn != "")
                    {
                        rtn += "该药品(物资)在上述科室数量不为0,您确定要停用么?";
                    }
                }
            }
            return(rtn);
        }