public override decimal AddStoreNum(int makerId, int deptId, decimal addNum)
 {
     try
     {
         ypDal._oleDb = oleDb;
         //如果药房存在药品
         decimal oldNum = storeQuery.QueryNum(makerId, deptId);
         if (oldNum != -1)
         {
             if (oldNum + addNum >= 0)
             {
                 //添加药品信息
                 ypDal.YF_Storage_AddStore(makerId, addNum, deptId);
                 return(oldNum + addNum);
             }
             else
             {
                 string drugName = "[" + DrugBaseDataBll.GetDurgName(makerId) + "]";
                 throw new Exception(drugName + "药品退库数量过多,请核查药品退库数量");
             }
         }
         return(oldNum);
     }
     catch (Exception error)
     {
         throw error;
     }
 }
        /// <summary>
        /// 月结对账算法
        /// </summary>
        /// <param name="accountList">月末未结算的各药品最后一笔台帐记录</param>
        protected DataTable CheckAccount(List <YP_Account> accountList)
        {
            DataTable wrongDt    = base.BuildWrongDataTable();
            Hashtable makerdicDt = new Hashtable();

            foreach (YP_Account act in accountList)
            {
                if (!makerdicDt.ContainsKey(act.MakerDicID))
                {
                    makerdicDt.Add(act.MakerDicID, act);
                }
                else if (act.MAccountID > ((YP_Account)(makerdicDt[act.MakerDicID])).MAccountID)
                {
                    makerdicDt[act.MakerDicID] = act;
                }
            }
            foreach (object makerDicId in makerdicDt)
            {
                YP_Dal dal = new YP_Dal();
                dal._oleDb = oleDb;
                YP_Account hashValue = (YP_Account)((DictionaryEntry)makerDicId).Value;
                _makerDicId = hashValue.MakerDicID;
                List <YP_Account> actList    = accountList.FindAll(match);
                decimal           balanceFee = 0;
                decimal           storeFee   = dal.YF_GetDrugFee(hashValue.DeptID, hashValue.MakerDicID);
                decimal           storeNum   = StoreFactory.GetQuery(ConfigManager.YF_SYSTEM).QueryNum(hashValue.MakerDicID,
                                                                                                       hashValue.DeptID);
                foreach (YP_Account act in actList)
                {
                    if (act.AccountType == 0)
                    {
                        balanceFee = act.BalanceFee;
                    }
                }
                foreach (YP_Account act in actList)
                {
                    balanceFee += act.LenderFee;
                    balanceFee -= act.DebitFee;
                }

                if (Convert.ToDecimal(Math.Abs(hashValue.BalanceFee - balanceFee)) > 2 ||
                    Convert.ToDecimal(Math.Abs(hashValue.BalanceFee - storeFee)) > 2 ||
                    Math.Abs(hashValue.OverNum - storeNum) > 0)
                {
                    string  drugName = DrugBaseDataBll.GetDurgName(hashValue.MakerDicID);
                    DataRow errorRow = wrongDt.NewRow();
                    errorRow["CHEMNAME"]      = drugName;
                    errorRow["MAKERDICID"]    = hashValue.MakerDicID;
                    errorRow["WRONGFEE"]      = hashValue.BalanceFee - balanceFee;
                    errorRow["STOREWRONGFEE"] = storeFee - hashValue.BalanceFee;
                    errorRow["WRONGNUM"]      = storeNum - hashValue.OverNum;
                    errorRow["BALANCEFEE"]    = hashValue.BalanceFee;
                    errorRow["BALANCENUM"]    = hashValue.OverNum;
                    errorRow["UNIT"]          = hashValue.LeastUnit;
                    errorRow["UNITNUM"]       = hashValue.UnitNum;
                    wrongDt.Rows.Add(errorRow);
                }
            }
            return(wrongDt);
        }
 private void txtQueryCode_AfterSelectedRow(object sender, object SelectedValue)
 {
     try
     {
         DataRow dr = (DataRow)SelectedValue;
         if (dr != null)
         {
             txtQueryCode.Text = "";
             int deptId = Convert.ToInt32(dr["DEPT_ID"]);
             if (DrugBaseDataBll.ExistDrugDept(deptId))
             {
                 _currentDept = DrugBaseDataBll.FindDrugDept(deptId);
                 ShowCurrentDept();
                 this.btnDel.Focus();
             }
             else
             {
                 _currentDept           = new YP_DeptDic();
                 _currentDept.DeptID    = deptId;
                 _currentDept.DeptName  = Convert.ToString(dr["NAME"]);
                 _currentDept.DeptType1 = "药库";
                 _currentDept.Use_Flag  = 0;
                 ShowCurrentDept();
                 this.btnAdd.Focus();
             }
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #4
0
 private void LoadData()
 {
     try
     {
         dgrdInMaker.AutoGenerateColumns = false;
         dgrdInOrder.AutoGenerateColumns = false;
         _masterDt = _billQurey.LoadMaster(BuildConditionParams());
         this.dgrdInMaker.DataSource = _masterDt;
         if (chkIsPay.Checked)
         {
             DataRow[] selectRows = _masterDt.Select("PAY_FLAG=" + cobPayState.SelectedIndex.ToString());
             if (selectRows.Length > 0)
             {
                 _masterDt = selectRows.CopyToDataTable();
                 this.dgrdInMaker.DataSource = _masterDt;
             }
             else
             {
                 _masterDt.Rows.Clear();
             }
         }
         _supportDt = DrugBaseDataBll.LoadSupportInfo();
         txtSupport.SetSelectionCardDataSource(_supportDt);
         dgrdInMaker_CurrentCellChanged(null, null);
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
 private void LoadData()
 {
     dgrdByName.AutoGenerateColumns = false;
     _bynameDt             = DrugBaseDataBll.LoadDrugByName(_currentSpec);
     dgrdByName.DataSource = _bynameDt;
     dgrdByName_CurrentCellChanged(null, null);
 }
Exemple #6
0
        private void txtQueryCode_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyValue == 13)
            {
                string queryname = txtQueryCode.Text.Trim();
                string strWhere  = "";
                switch (_queryType)
                {
                case 0:
                    strWhere += ("G.PYM like '%" + queryname + "%'"
                                 + " or G.WBM like '%" + queryname + "%'"
                                 + " or A.CHEMNAME like '%" + queryname.ToUpper() + "%'");
                    break;

                default:
                    strWhere += ("A.TypeDicID=" + _queryType.ToString());
                    strWhere += (" AND (G.PYM like '%" + queryname + "%'"
                                 + " or G.WBM like '%" + queryname + "%'"
                                 + " or A.CHEMNAME like '%" + queryname.ToUpper() + "%')");
                    break;
                }
                if (chkIsUse.Checked == false)
                {
                    _SpecDt = DrugBaseDataBll.LoadSpecDic(strWhere);
                }
                else
                {
                    _SpecDt = DrugBaseDataBll.LoadUseSpec(strWhere);
                }
                dgrdDrugSpec.DataSource = _SpecDt;
                _currentSpec            = GetSpecFromDt(_SpecDt, 0);
                ShowCurrentSpec();
            }
        }
Exemple #7
0
 /// <summary>
 /// 从数据库中加载数据
 /// </summary>
 private void LoadData(bool isInit)
 {
     try
     {
         if (isInit)
         {
             dgrdDrugSpec.AutoGenerateColumns = false;
             _SpecDt = DrugBaseDataBll.LoadSpecDic();
             _unitDt = DrugBaseDataBll.LoadDrugUnit();
             _doseDt = DrugBaseDataBll.LoadDrugDose();
             _typeDt = DrugBaseDataBll.LoadDrugType();
             LoadTree();
             dgrdDrugSpec.DataSource = _SpecDt;
             txtDgType.SetSelectionCardDataSource(_typeDt);
             txtPackUnit.SetSelectionCardDataSource(_unitDt);
             txtDoseUnit.SetSelectionCardDataSource(_unitDt);
             txtLeastUnit.SetSelectionCardDataSource(_unitDt);
             txtDrugDose.SetSelectionCardDataSource(_doseDt);
             txtPharmacology.SetSelectionCardDataSource(_pharmacologyDt);
         }
         else
         {
             _SpecDt = DrugBaseDataBll.LoadSpecDic();
             dgrdDrugSpec.DataSource = _SpecDt;
         }
     }
     catch (Exception error)
     {
         throw error;
     }
 }
Exemple #8
0
 private void tsrbtnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckInput() == true)
         {
             if (_currentState == ADD)
             {
                 string[] pywbcodeName     = new string[2];
                 string[] pywbcodeChemName = new string[2];
                 pywbcodeName     = PublicStaticFun.GetPyWbCode(_currentSpec.Name);
                 pywbcodeChemName = PublicStaticFun.GetPyWbCode(_currentSpec.ChemName);
                 DrugBaseDataBll.AddDgSpec(_currentSpec, pywbcodeName, pywbcodeChemName);
                 TextBoxEnable(false, false);
                 MessageBox.Show("保存成功");
             }
             else if (_currentState == UPDATE)
             {
                 DrugBaseDataBll.UpdateDgSpec(_currentSpec);
                 TextBoxEnable(false, true);
                 MessageBox.Show("更新成功");
             }
             _currentState = NORMAL;
             ButtonEnable();
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #9
0
 private void cobDrugType_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cobDrugType.Enabled == true)
     {
         int index = cobDrugType.SelectedIndex;
         drugTypeId = typeList[index].TypeDicID;
         if (index != -1)
         {
             doseList = DrugBaseDataBll.GetDoseType(index + 1);
             cobDrugDose.Items.Clear();
             YP_DoseDic newDose = new YP_DoseDic();
             newDose.DoseName = "无剂型药品";
             doseList.Insert(0, newDose);
             foreach (YP_DoseDic dose in doseList)
             {
                 cobDrugDose.Items.Add(dose.DoseName);
                 cobDrugDose.Tag = dose;
             }
             cobDrugDose.SelectedIndex = 0;
             if (chkDrugDose.Checked)
             {
                 drugDoseId = 0;
             }
             else
             {
                 drugDoseId = -1;
             }
         }
     }
 }
Exemple #10
0
 private void tsrbtnDel_Click(object sender, EventArgs e)
 {
     if (_currentSpec == null)
     {
         MessageBox.Show("没有数据被选择");
         return;
     }
     try
     {
         if (MessageBox.Show("您确认要删除该规格药品么?" +
                             "[" + _currentSpec.ChemName + "]",
                             "提示",
                             MessageBoxButtons.OKCancel,
                             MessageBoxIcon.Asterisk) == DialogResult.OK)
         {
             if (DrugBaseDataBll.IsHaveStoreNum(_currentSpec))
             {
                 MessageBox.Show("该规格的药品已经有库存数量,无法删除,请先确保数量为0");
                 return;
             }
             if (_currentState == NORMAL)
             {
                 DrugBaseDataBll.DeleteDgSpec(_currentSpec.SpecDicID);
                 MessageBox.Show("删除成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
             }
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #11
0
 private void tsrbtnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckInput() == true)
         {
             _currentSupport.PYM = PublicStaticFun.GetPyWbCode(_currentSupport.Name)[0].ToString();
             _currentSupport.WBM = PublicStaticFun.GetPyWbCode(_currentSupport.Name)[1].ToString();
             if (_currentState == ADD)
             {
                 DrugBaseDataBll.AddSupport(_currentSupport);
                 DrugBaseDataBll.AddSupport(_supportInfo, _currentSupport);
                 EnableTextBox(false);
                 MessageBox.Show("添加成功");
             }
             else if (_currentState == UPDATE)
             {
                 DrugBaseDataBll.UpdateSupport(_currentSupport);
                 DrugBaseDataBll.UpdateSupport(_currentSupport, _supportInfo, dgrdSupport.CurrentCell.RowIndex);
                 EnableTextBox(false);
                 MessageBox.Show("更新成功");
             }
             tsrSupport.Focus();
             tsrbtnAdd.Select();
             _currentState = NORMAL;
             EnableButton();
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #12
0
 private void tsrbtnCancelDel_Click(object sender, EventArgs e)
 {
     if (_currentSpec == null)
     {
         MessageBox.Show("没有数据被选择");
         return;
     }
     try
     {
         if (MessageBox.Show("您确认要重新启用该规格药品么?" +
                             "[" + _currentSpec.ChemName + "]",
                             "提示",
                             MessageBoxButtons.OKCancel,
                             MessageBoxIcon.Asterisk) == DialogResult.OK)
         {
             if (_currentState == NORMAL)
             {
                 DrugBaseDataBll.CancelDelteDgSpec(_currentSpec.SpecDicID);
                 MessageBox.Show("该规格药品已重新启用", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
             }
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
 public override Hashtable ChangeStoreNum(BillMaster billMaster, List <BillOrder> orderList)
 {
     try
     {
         Hashtable storeNumHash = new Hashtable();
         foreach (BillOrder order in orderList)
         {
             YP_StoreNum storeNum      = new YP_StoreNum();
             YP_OutOrder orderOutstore = (YP_OutOrder)order;
             storeNum.smallUnit  = orderOutstore.LeastUnit;
             storeNum.makerDicId = orderOutstore.MakerDicID;
             decimal reduceNum = orderOutstore.OutNum;
             decimal rtn       = ReduceStoreNum(orderOutstore.MakerDicID, orderOutstore.DeptID, reduceNum);
             if (rtn != -1)
             {
                 storeNum.storeNum = rtn;
                 storeNum.queryKey = storeNum.makerDicId.ToString() + orderOutstore.ProductNum;
             }
             else
             {
                 string drugName = DrugBaseDataBll.GetDurgName(storeNum.makerDicId);
                 throw new Exception("[" + drugName + "]" + "出库数量过多,审核失败");
             }
             storeNumHash.Add(storeNum.queryKey, storeNum);
         }
         BatchProcessor.ReduceBatchNum(orderList);
         return(storeNumHash);
     }
     catch (Exception error)
     {
         throw error;
     }
 }
 private void UpdateMaker()
 {
     DrugBaseDataBll.UpdateDgMaker(_currentMaker);
     LoadData();
     txtRetailPrice.Enabled = true;
     txtTradePrice.Enabled  = true;
     TextBoxEnable(false);
     MessageBox.Show("更新成功");
 }
Exemple #15
0
 private void LoadData()
 {
     dgrdInOrder.AutoGenerateColumns = false;
     _supportDt  = DrugBaseDataBll.LoadSupportInfo();
     _drugInfoDt = DrugBaseDataBll.YD_LoadDrugInfo((int)_currentDeptId);
     txtSupport.SetSelectionCardDataSource(_supportDt);
     txtDgCode.SetSelectionCardDataSource(_drugInfoDt);
     _inOrderDt             = _billQuery.LoadOrder(_currentMaster);
     dgrdInOrder.DataSource = _inOrderDt;
     _batchDt = _storeQuery.LoadBatch((int)_currentDeptId);
 }
Exemple #16
0
 private void LoadData()
 {
     try
     {
         _productInfo           = DrugBaseDataBll.LoadProductInfo();
         dgrdProduct.DataSource = _productInfo;
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #17
0
 private void LoadData()
 {
     try
     {
         _supportInfo           = DrugBaseDataBll.LoadSupportInfo();
         dgrdSupport.DataSource = _supportInfo;
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
 private void tsrbtnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (_currentState == NORMAL)
         {
             return;
         }
         if (CheckInput() == true)
         {
             if (_currentState == ADD)
             {
                 DrugBaseDataBll.AddDgMaker(_currentMaker, _currentSpec);
                 LoadData();
                 if (_makerDt.Rows.Count > 0)
                 {
                     dgrdMaker.CurrentCell = dgrdMaker[0, _makerDt.Rows.Count - 1];
                 }
                 else
                 {
                     dgrdMaker.CurrentCell = dgrdMaker[0, 0];
                 }
                 TextBoxEnable(false);
                 MessageBox.Show("添加成功");
             }
             else if (_currentState == UPDATE)
             {
                 string storeInfo = CheckDrugStore();
                 if (storeInfo != "")
                 {
                     if (MessageBox.Show(CheckDrugStore(), "提示",
                                         MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
                     {
                         UpdateMaker();
                     }
                 }
                 else
                 {
                     UpdateMaker();
                 }
             }
             _currentState = NORMAL;
             this.tsrMakerDic.Focus();
             this.tsrbtnAdd.Select();
             ButtonEnable();
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #19
0
 private void tsrbtnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         DataTable printTable = DrugBaseDataBll.LoadFirstCheckDrug("");
         string    startPath  = Application.StartupPath + "\\report\\药品期初盘点单.grf";
         YP_Printer.PrintUseDrug(startPath, (int)_currentUserId, (int)_currentDeptId, printTable);
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #20
0
 private void FrmSelectOutDept_Load(object sender, EventArgs e)
 {
     try
     {
         _dgDeptDt = DrugBaseDataBll.YK_DeptGet(ConfigManager.OP_YK_OUTTOYF);
         txtSelectDept.SetSelectionCardDataSource(_dgDeptDt);
         txtSelectDept.Focus();
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #21
0
 private void txtDoseUnit_AfterSelectedRow(object sender, object SelectedValue)
 {
     if (txtDoseUnit.ReadOnly == true)
     {
         return;
     }
     if (SelectedValue != null)
     {
         _currentSpec.DoseUnit = Convert.ToInt32(txtDoseUnit.MemberValue);
         DrugBaseDataBll.CombineSpec(_currentSpec, _unitDt);
         txtDrugSpec.Text = _currentSpec.Spec;
     }
 }
 private void tsrbtnSave_Click(object sender, EventArgs e)
 {
     try
     {
         if (CheckInput() == true)
         {
             if (_currentState == ADD)
             {
                 _currentByname.PYM = PublicStaticFun.GetPyWbCode(this.txtByname.Text)[0].ToString();
                 _currentByname.WBM = PublicStaticFun.GetPyWbCode(this.txtByname.Text)[1].ToString();
                 this.txtPYM.Text   = _currentByname.PYM;
                 this.txtWBM.Text   = _currentByname.WBM;
                 DrugBaseDataBll.AddDgByname(_currentByname);
                 LoadData();
                 if (_bynameDt.Rows.Count > 0)
                 {
                     dgrdByName.CurrentCell = dgrdByName[0, _bynameDt.Rows.Count - 1];
                 }
                 else
                 {
                     dgrdByName.CurrentCell = dgrdByName[0, 0];
                 }
                 TextBoxEnable(false);
                 MessageBox.Show("添加成功");
             }
             else if (_currentState == UPDATE)
             {
                 //_currentByname.PYM = PublicStaticFun.GetPyWbCode(this.txtByname.Text)[0].ToString();
                 //_currentByname.WBM = PublicStaticFun.GetPyWbCode(this.txtByname.Text)[1].ToString();
                 //this.txtPYM.Text = _currentByname.PYM;
                 //this.txtWBM.Text = _currentByname.WBM;
                 _currentByname.PYM = this.txtPYM.Text.Trim();
                 _currentByname.WBM = this.txtWBM.Text.Trim();
                 DrugBaseDataBll.UpdateByname(_currentByname);
                 LoadData();
                 TextBoxEnable(false);
                 MessageBox.Show("更新成功");
             }
             _currentState = NORMAL;
             ButtonEnable();
             TextBoxEnable(false);
             this.tsrDrugByName.Focus();
             this.tsrbtnAdd.Select();
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #23
0
 private void tsrbtnRefresh_Click(object sender, EventArgs e)
 {
     try
     {
         _supportDt  = DrugBaseDataBll.LoadSupportInfo();
         _drugInfoDt = DrugBaseDataBll.YD_LoadDrugInfo((int)_currentDeptId);
         txtSupport.SetSelectionCardDataSource(_supportDt);
         txtDgCode.SetSelectionCardDataSource(_drugInfoDt);
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #24
0
 private void treePharmacology_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     try
     {
         int pharmacologyId = Convert.ToInt32(e.Node.Tag);
         _SpecDt = DrugBaseDataBll.LoadSpecDic("PHARMACOLOGY=" + pharmacologyId.ToString());
         dgrdDrugSpec.DataSource = _SpecDt;
         _currentSpec            = GetSpecFromDt(_SpecDt, 0);
         ShowCurrentSpec();
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #25
0
        private void dgrdSupport_CurrentCellChanged(object sender, EventArgs e)
        {
            int index;

            if (dgrdSupport.CurrentCell != null)
            {
                index = dgrdSupport.CurrentCell.RowIndex;
            }
            else
            {
                index = 0;
            }
            _currentSupport = DrugBaseDataBll.GetSupportFormDt(_supportInfo.DefaultView.ToTable(), index);
            ShowCurrentSupport();
        }
 public FrmStockControl(IFrmStockPlan frmstockplan)
 {
     try
     {
         _frmstockplan = frmstockplan;
         _drugInfo     = DrugBaseDataBll.YD_LoadDrugInfo(0, 0);
         _frmstockplan.RefreshDurgInfo(_drugInfo);
         _billProcessor = BillFactory.GetProcessor(ConfigManager.OP_YK_STOCKPLAN);
         _billQuery     = BillFactory.GetQuery(ConfigManager.OP_YK_STOCKPLAN);
     }
     catch (Exception error)
     {
         throw error;
     }
 }
 private void FrmStoreQuery_Load(object sender, EventArgs e)
 {
     if (_belongSystem == ConfigManager.YF_SYSTEM && !ConfigManager.ManageTradepriceByYF())
     {
         dgrdStoreQuery.Columns["TRADEPRICE"].Visible    = false;
         dgrdStoreQuery.Columns["TRADEFEE"].Visible      = false;
         dgrdStoreQuery.Columns["FEEDIFFERENCE"].Visible = false;
     }
     dgrdStoreQuery.AutoGenerateColumns = false;
     _doseDt = DrugBaseDataBll.LoadDoseWithSelect();
     _typeDt = DrugBaseDataBll.LoadTypeWithSelect();
     cobDrugType.DataSource    = _typeDt;
     cobDrugType.SelectedIndex = 0;
     LoadData();
 }
Exemple #28
0
 private void LoadDeptBussiness()
 {
     try
     {
         if (_currentDept != null)
         {
             _deptOpDt             = DrugBaseDataBll.QueryDeptBussiness(_currentDept);
             dgrdDeptOP.DataSource = _deptOpDt;
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #29
0
 private void LoadData()
 {
     try
     {
         dgrdDeptInfo.AutoGenerateColumns = false;
         _deptDt     = DrugBaseDataBll.LoadDrugTypeDept();
         _drugDeptDt = DrugBaseDataBll.LoadAllDrugDept();
         txtQueryCode.SetSelectionCardDataSource(_deptDt);
         dgrdDeptInfo.DataSource = _drugDeptDt;
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #30
0
 private void tsrbtnUpdate_Click(object sender, EventArgs e)
 {
     if (_currentSpec == null)
     {
         MessageBox.Show("没有数据被选择");
         return;
     }
     if (_currentState == NORMAL)
     {
         TextBoxEnable(true, DrugBaseDataBll.IsHaveStoreRecord(_currentSpec));
         FilterDoseDt(_currentSpec.TypeDicID);
         _currentState = UPDATE;
         ButtonEnable();
         this.txtDrugName.Focus();
     }
 }