private void dgrdOrderInfo_CurrentCellChanged(object sender, EventArgs e)
 {
     try
     {
         if (dgrdOrderInfo.CurrentCell != null)
         {
             int currentIndex = dgrdOrderInfo.CurrentCell.RowIndex;
             DataRowToOutorder(_outOrderDt.DefaultView.ToTable().Rows[currentIndex], _currentOrder);
             ShowCurrentOrder();
             if (!chkShowStoreBatch.Checked)
             {
                 txtBatchNum.SetSelectionCardDataSource(_storQuery.LoadBatchWithDelete(_currentOrder.MakerDicID,
                                                                                       (int)_currentDeptId));
             }
             else
             {
                 txtBatchNum.SetSelectionCardDataSource(_storQuery.LoadBatch(_currentOrder.MakerDicID,
                                                                             (int)_currentDeptId));
             }
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Exemple #2
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);
 }
 private void dgrdStoreQuery_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         if (dgrdStoreQuery.CurrentCell != null && _belongSystem == ConfigManager.YK_SYSTEM)
         {
             if (pnlBatchQuery.Visible == false)
             {
                 pnlBatchQuery.Visible = true;
             }
             int index = dgrdStoreQuery.CurrentCell.RowIndex;
             if (index > -1)
             {
                 int makerDicId = Convert.ToInt32(_storeDt.Rows[index]["MAKERDICID"]);
                 dgrdBatch.AutoGenerateColumns = false;
                 dgrdBatch.DataSource          = _storeQuery.LoadBatch(makerDicId, (int)_currentDept);
             }
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }