/// <summary>
        /// 加载基本数据
        /// </summary>
        public void LoadINFO()
        {
            DataTable tb = null;

            if (view.PresType == PresType.划价)
            {
                tb = zyPresOrder.LoadDrugData(dept.DeptID.ToString());
            }
            else if (view.PresType == PresType.记账)
            {
                tb = zyPresOrder.LoadAllData(view.yfDeptID.ToString());
            }

            tb.TableName = "ITEM_DICTIONARY";
            if (_dataSet.Tables.Contains("ITEM_DICTIONARY"))
            {
                _dataSet.Tables.Remove("ITEM_DICTIONARY");
            }
            _dataSet.Tables.Add(tb);

            tb           = BaseDataFactory.GetData(baseDataType.医生);
            tb.TableName = "User";
            if (_dataSet.Tables.Contains("User"))
            {
                _dataSet.Tables.Remove("User");
            }
            _dataSet.Tables.Add(tb);

            tb           = BaseDataFactory.GetData(baseDataType.住院临床科室);
            tb.TableName = "Dept";
            if (_dataSet.Tables.Contains("Dept"))
            {
                _dataSet.Tables.Remove("Dept");
            }
            _dataSet.Tables.Add(tb);

            if (_dataSet.Tables.Contains("yfDept"))
            {
                _dataSet.Tables.Remove("yfDept");
            }

            tb           = BaseDataFactory.GetData(baseDataType.药房科室);
            tb.TableName = "yfDept";
            DataRow dr = tb.NewRow();

            dr["deptname"] = "全部药房";
            dr["deptid"]   = -1;
            tb.Rows.Add(dr);
            _dataSet.Tables.Add(tb);

            view.Initialize(_dataSet);
        }
Beispiel #2
0
        private void LoadItemDic()
        {
            DataTable tb = null;

            tb           = zyPresOrder.LoadAllData();
            tb.TableName = "ITEM_DICTIONARY";
            _dataSet.Tables.Add(tb);
            tb           = zyPresOrder.LoadDrugData();
            tb.TableName = "ITEM_DRUG";
            _dataSet.Tables.Add(tb);
        }