Пример #1
0
 private void btnFind_Click(object sender, EventArgs e)
 {
     try
     {
         _billQuery = BillFactory.GetQuery(ConfigManager.OP_YF_DISPENSE);
         DataTable allMaster = _billQuery.LoadMaster(BuildConditionParams());
         _dispMasterDt = allMaster.Clone();
         DataRow[] filterRows;
         if (this.txtInvoiceNoQuery.Text.Trim() == "00000000")
         {
             filterRows = allMaster.Select("INVOICENUM<>0 and DrugOC_Flag=0");
         }
         else
         {
             filterRows = allMaster.Select("INVOICENUM=" + Convert.ToInt32(txtInvoiceNoQuery.Text)
                                           + " and DrugOC_Flag=1");
         }
         foreach (DataRow dr in filterRows)
         {
             _dispMasterDt.Rows.Add(dr.ItemArray);
         }
         dgrdDRMaster.AutoGenerateColumns = false;
         dgrdDRMaster.DataSource          = _dispMasterDt;
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Пример #2
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);
     }
 }
Пример #3
0
 private void LoadData()
 {
     try
     {
         if (tabDispQuery.SelectedTab == tabPgSingle)
         {
             _billQuery = BillFactory.GetQuery(ConfigManager.OP_YF_DISPENSE);
             DataTable allMaster = _billQuery.LoadMaster(BuildConditionParams());
             _dispMasterDt = allMaster.Clone();
             if (cobOPType.Text == "门诊")
             {
                 DataRow[] filterRows;
                 if (txtQueryCode.Text == "")
                 {
                     filterRows = allMaster.Select("INVOICENUM<>0");
                 }
                 else
                 {
                     filterRows = allMaster.Select("INVOICENUM=" + txtQueryCode.Text);
                 }
                 foreach (DataRow dr in filterRows)
                 {
                     _dispMasterDt.Rows.Add(dr.ItemArray);
                 }
             }
             else
             {
                 DataRow[] filterRows;
                 if (txtQueryCode.Text == "")
                 {
                     filterRows = allMaster.Select("INVOICENUM=0");
                 }
                 else
                 {
                     filterRows = allMaster.Select("INPATIENTID='" + txtQueryCode.Text + "' AND INVOICENUM=0");
                 }
                 foreach (DataRow dr in filterRows)
                 {
                     _dispMasterDt.Rows.Add(dr.ItemArray);
                 }
             }
             dgrdDRMaster.DataSource = _dispMasterDt;
             if (_dispOrderDt != null)
             {
                 _dispOrderDt.Rows.Clear();
             }
         }
         else
         {
             _billQuery  = BillFactory.GetQuery(ConfigManager.OP_YF_DISPENSE + "ZY_TL");
             _deptDispDt = _billQuery.LoadMaster(BuildConditionParams());
             dgrdDispDept.AutoGenerateColumns = false;
             dgrdDispDept.DataSource          = _deptDispDt;
         }
     }
     catch (Exception error)
     {
         throw error;
     }
 }
Пример #4
0
        /// <summary>
        /// 加载已发药消息列表
        /// </summary>
        private void LoadDispHisMaster()
        {
            try
            {
                if (_recipeOrder != null)
                {
                    _recipeOrder.Rows.Clear();
                    _recipeOrder = null;
                }

                BillQuery _billQuery = BillFactory.GetQuery(ConfigManager.OP_YF_DISPENSE);
                DataTable allMaster  = _billQuery.LoadMaster(BuildConditionParams());
                _dispMasterDt = allMaster.Clone();
                foreach (DataRow dr in allMaster.Rows)
                {
                    _dispMasterDt.Rows.Add(dr.ItemArray);
                }
                if (_dispOrderDt != null)
                {
                    _dispOrderDt.Rows.Clear();
                }
                treeDrugMsg.Nodes.Clear();
                TreeNode allDeptNode = new TreeNode("全院科室");
                allDeptNode.Tag        = 0;
                allDeptNode.ImageIndex = 0;
                treeDrugMsg.Nodes.Add(allDeptNode);
                for (int index = 0; index < _deptDt.Rows.Count; index++)
                {
                    TreeNode deptNode = new TreeNode(_deptDt.Rows[index]["NAME"].ToString());
                    deptNode.ImageIndex = 0;
                    deptNode.Tag        = Convert.ToInt32(_deptDt.Rows[index]["DEPT_ID"]);
                    if (Convert.ToInt32(deptNode.Tag) > 0)
                    {
                        allDeptNode.Nodes.Add(deptNode);
                        DataRow[] rows = _dispMasterDt.Select("currdeptcode='" + deptNode.Tag.ToString().Trim() + "'");
                        if (rows != null && rows.Length > 0)
                        {
                            for (int temp = 0; temp < rows.Length; temp++)
                            {
                                TreeNode msgNode  = new TreeNode();
                                string   nodetext = rows[temp]["patientname"].ToString() + "-- 发药时间 --" + Convert.ToDateTime(rows[temp]["optime"]).ToString("yyyy-MM-dd HH:mm:ss");
                                msgNode.Text = nodetext;
                                if (rows[temp]["optype"].ToString() == "004")
                                {
                                    msgNode.ForeColor = Color.Red;
                                }
                                msgNode.Tag = rows[temp];
                                deptNode.Nodes.Add(msgNode);
                            }
                        }
                    }
                    deptNode.Expand();
                }
                allDeptNode.Expand();
            }
            catch (Exception error)
            {
                throw error;
            }
        }
Пример #5
0
 private void LoadData()
 {
     dgrdCheckMaster.AutoGenerateColumns = false;
     dgrdCheckOrder.AutoGenerateColumns  = false;
     _masterDt = _billQuery.LoadMaster(BuildConditionParams());
     dgrdCheckMaster.DataSource = _masterDt;
     dgrdCheckMaster_CurrentCellChanged(null, null);
 }
Пример #6
0
 /// <summary>
 /// 加载已发药消息列表
 /// </summary>
 private void LoadDispHisMaster()
 {
     try
     {
         if (_recipeOrder != null)
         {
             _recipeOrder.Rows.Clear();
             _recipeOrder = null;
         }
         BillQuery _billQuery = BillFactory.GetQuery(ConfigManager.OP_YF_DISPENSE + "ZY_TL");
         DataTable deptDispDt = _billQuery.LoadMaster(BuildConditionParams());
         treeDrugMsg.Nodes.Clear();
         TreeNode allDeptNode = new TreeNode("全院科室");
         allDeptNode.Tag        = 0;
         allDeptNode.ImageIndex = 0;
         treeDrugMsg.Nodes.Add(allDeptNode);
         for (int index = 0; index < _deptDt.Rows.Count; index++)
         {
             TreeNode deptNode = new TreeNode(_deptDt.Rows[index]["NAME"].ToString());
             deptNode.ImageIndex = 0;
             deptNode.Tag        = Convert.ToInt32(_deptDt.Rows[index]["DEPT_ID"]);
             if (Convert.ToInt32(deptNode.Tag) > 0)
             {
                 allDeptNode.Nodes.Add(deptNode);
                 if (deptDispDt != null)
                 {
                     for (int temp = 0; temp < deptDispDt.Rows.Count; temp++)
                     {
                         DataRow currentRow = deptDispDt.Rows[temp];
                         if (Convert.ToInt32(currentRow["DISPDEPT"]) == Convert.ToInt32(deptNode.Tag))
                         {
                             TreeNode msgNode = new TreeNode();
                             string   date    = Convert.ToDateTime(currentRow["OPTIME"]).ToString("yyyy-MM-dd HH:mm");
                             msgNode.Text = date;
                             msgNode.Tag  = currentRow;
                             deptNode.Nodes.Add(msgNode);
                         }
                     }
                 }
             }
             deptNode.Expand();
         }
         allDeptNode.Expand();
     }
     catch (Exception error)
     {
         throw error;
     }
 }
Пример #7
0
 private void LoadData()
 {
     try
     {
         dgrdAdjMaster.AutoGenerateColumns = false;
         dgrdAdjOrder.AutoGenerateColumns  = false;
         _masterDt = _billQuery.LoadMaster(BuildConditionParams());
         dgrdAdjMaster.DataSource = _masterDt;
         dgrdAdjMaster_CurrentCellChanged(null, null);
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }
Пример #8
0
        public void LoadPlanMaster(DateTime beginTime, DateTime endTime)
        {
            try
            {
                if (_masterDt != null)
                {
                    _masterDt.Rows.Clear();
                }
                _masterDt = _billQuery.LoadMaster(BuildConditionParams(beginTime, endTime));

                _frmstockplan.RefreshMaster(_masterDt);
            }
            catch (Exception error)
            {
                throw error;
            }
        }