Пример #1
0
        public static DataTable LoadDrugStore(YP_DeptDic currentDept, string drugType, string queryCode)
        {
            DataTable storeDt    = null;
            int       drugTypeId = 0;

            if (currentDept != null)
            {
                switch (drugType)
                {
                case "西药":
                    drugTypeId = 1;
                    break;

                case "中药":
                    drugTypeId = 3;
                    break;

                case "中成药":
                    drugTypeId = 2;
                    break;

                case "医用物资":
                    drugTypeId = 4;
                    break;

                default:
                    break;
                }
                switch (currentDept.DeptType1)
                {
                case "药房":
                    storeDt = StoreFactory.GetQuery(ConfigManager.YF_SYSTEM).QueryStoreInfo(
                        drugTypeId,
                        0,
                        currentDept.DeptID,
                        queryCode);
                    break;

                case "药库":
                    storeDt = StoreFactory.GetQuery(ConfigManager.YK_SYSTEM).QueryStoreInfo(
                        drugTypeId,
                        0,
                        currentDept.DeptID,
                        queryCode);
                    break;

                case "物资":
                    storeDt = StoreFactory.GetQuery(ConfigManager.YK_SYSTEM).QueryStoreInfo(
                        drugTypeId,
                        0,
                        currentDept.DeptID,
                        queryCode);
                    break;

                default:
                    break;
                }
            }
            return(storeDt);
        }
Пример #2
0
        public static decimal LoadRetailFee(YP_DeptDic currentDept)
        {
            try
            {
                decimal rtn = 0;
                if (currentDept != null)
                {
                    switch (currentDept.DeptType1)
                    {
                    case "药房":
                        rtn = StoreFactory.GetQuery(ConfigManager.YF_SYSTEM).QueryStoreFee(currentDept.DeptID, 0);
                        break;

                    case "药库":
                        rtn = StoreFactory.GetQuery(ConfigManager.YK_SYSTEM).QueryStoreFee(currentDept.DeptID, 0);
                        break;

                    case "物资":
                        rtn = StoreFactory.GetQuery(ConfigManager.YK_SYSTEM).QueryStoreFee(currentDept.DeptID, 0);
                        break;

                    default:
                        break;
                    }
                }
                return(rtn);
            }
            catch (Exception error)
            {
                throw error;
            }
        }
Пример #3
0
 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);
     }
 }
Пример #4
0
 public void LoadCheckOrder(int auditNo, YP_DeptDic drugDept)
 {
     try
     {
         _checkInfoDt = YP_Loader.LoadCheckInfo(auditNo, drugDept.DeptID, drugDept.DeptType1, _drugType, _queryMakerId);
         _frmCheckQuery.RefreshCheckOrder(_checkInfoDt);
     }
     catch (Exception error)
     {
         throw error;
     }
 }
Пример #5
0
 private void dgrdDeptInfo_CurrentCellChanged_1(object sender, EventArgs e)
 {
     if (dgrdDeptInfo.CurrentCell != null)
     {
         int currentIndex = dgrdDeptInfo.CurrentCell.RowIndex;
         if (_drugDeptDt.Rows.Count < currentIndex || _drugDeptDt.Rows.Count == 0)
         {
             _currentDept = null;
             return;
         }
         else
         {
             DrugBaseDataBll.GetDrugDeptFromDt(_drugDeptDt.DefaultView.ToTable(), currentIndex, _currentDept);
             ShowCurrentDept();
             LoadDeptBussiness();
             return;
         }
     }
 }
Пример #6
0
 private void treeCheckMaster_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     try
     {
         if (e.Node != null)
         {
             if (e.Node.Level == 2 && e.Node.Parent != null)
             {
                 YP_DeptDic drugDept = (YP_DeptDic)(e.Node.Parent.Tag);
                 int        auditNo  = (int)(e.Node.Tag);
                 _control.LoadCheckOrder(auditNo, drugDept);
             }
         }
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
 }