Exemplo n.º 1
0
        /// <summary>
        /// 显示药品列表  不显示药库停用的药品 与药房是否停用无关
        /// </summary>
        public virtual void ShowPharmacyList(string drugType)
        {
            Neusoft.NFC.Interface.Classes.Function.ShowWaitForm("正在检索药品信息...");
            Application.DoEvents();
            try
            {
                Neusoft.NFC.Management.DataBaseManger databaseManager = new Neusoft.NFC.Management.DataBaseManger();
                DataSet  dataSet  = new DataSet();
                string[] sqlIndex = new string[2] {
                    "Pharmacy.Item.ValibInfo", "Preparation.Item.GetList.QueryByType"
                };

                databaseManager.ExecQuery(sqlIndex, ref dataSet, drugType);
                if (dataSet == null)
                {
                    MessageBox.Show("检索列表数据发生错误\n" + databaseManager.Err);
                    return;
                }
                this.filterField = new string[7] {
                    "SPELL_CODE", "WB_CODE", "REGULAR_NAME", "REGULAR_SPELL",
                    "REGULAR_WB", "CUSTOM_CODE", "TRADE_NAME"
                };
                this.DataTable = dataSet.Tables[0];

                this.SetpharmacyFormat();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                Neusoft.NFC.Interface.Classes.Function.HideWaitForm();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 检索程序中需要的列表
        /// </summary>
        /// <param name="sqlIndex">检索的SQL语句在XML中的索引数组 第一位为select索引 其他为where索引</param>
        /// <param name="filterField">用于对该列表进行检索的字段,由sql语句检索的数据内选择</param>
        /// <param name="formatStr">对sql语句进行格式化的数据</param>
        public void ShowInfoList(string[] sqlIndex, string[] filterField, params string[] formatStr)
        {
            Neusoft.NFC.Interface.Classes.Function.ShowWaitForm("正在检索数据 请稍候.....");
            Application.DoEvents();

            try
            {
                this.DataAutoCellType = false;
                this.DataAutoHeading  = false;
                this.DataAutoWidth    = false;

                Neusoft.NFC.Management.DataBaseManger databaseManager = new Neusoft.NFC.Management.DataBaseManger();
                DataSet dataSet = new DataSet();
                databaseManager.ExecQuery(sqlIndex, ref dataSet, formatStr);
                if (dataSet == null)
                {
                    MessageBox.Show("检索列表数据发生错误\n" + databaseManager.Err);
                    return;
                }
                this.DataTable   = dataSet.Tables[0];
                this.FilterField = filterField;
            }
            catch (Exception ex)
            {
                MessageBox.Show("检索列表数据发生错误\n" + ex.Message);
            }
            finally
            {
                Neusoft.NFC.Interface.Classes.Function.HideWaitForm();
            }
        }
Exemplo n.º 3
0
        public string GetRuleSequence()
        {
            Neusoft.NFC.Management.DataBaseManger manager = new Neusoft.NFC.Management.DataBaseManger();
            this.SetDB(manager);

            return(manager.GetSequence("EPR.CaseWriteRule.GetRuleCodeSequence"));
        }
Exemplo n.º 4
0
        /// <summary>
        /// 获得
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public virtual string GetSetting(string id)
        {
            string sql = "select xml from emr_setting where id='{0}'";

            sql = string.Format(sql, id);
            Neusoft.NFC.Management.DataBaseManger manager = new Neusoft.NFC.Management.DataBaseManger();
            this.SetDB(manager);
            return(manager.ExecSqlReturnOne(sql));
        }
Exemplo n.º 5
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="obj"></param>
        /// <param name="xml"></param>
        /// <returns></returns>
        public virtual int SaveSetting(Neusoft.NFC.Object.NeuObject obj, string xml)
        {
            string sqlInsert = "INSERT INTO emr_setting	(id,name,memo) VALUES('{0}','{1}','{2}')		";
            string sqlDelete = "delete emr_setting where id='{0}'";
            string update    = string.Format("update emr_setting set xml=:a where id='{0}'", obj.ID);

            Neusoft.NFC.Management.DataBaseManger manager = new Neusoft.NFC.Management.DataBaseManger();
            this.SetDB(manager);
            manager.ExecNoQuery(sqlDelete, obj.ID);
            manager.ExecNoQuery(sqlInsert, obj.ID, obj.Name, obj.Memo);
            return(manager.InputLong(update, xml));
        }
Exemplo n.º 6
0
        /// <summary>
        /// 树管理类初始化
        /// </summary>
        /// <param name="addTree">数据添加树 向该树内添加节点</param>
        /// <param name="operTree">数据操作树 对该树内数据进行操作</param>
        /// <param name="nextTree">数据后继树 数据操作后移动目的树</param>
        /// <param name="funMode">功能模块类型</param>
        /// <param name="operDateState">数据添加树节点数据状态</param>
        internal ClinicTreeManager(TabPage addTab, TreeView addTree, TabPage operTab, TreeView operTree, TabPage nextTab, TreeView nextTree)
        {
            this.AddTab  = addTab;
            this.AddTree = addTree;

            this.OperTab  = operTab;
            this.OperTree = operTree;

            this.NextTab  = nextTab;
            this.NextTree = nextTree;

            Neusoft.NFC.Management.DataBaseManger dataBaseManager = new Neusoft.NFC.Management.DataBaseManger();
            this.minQueryDate = dataBaseManager.GetDateTimeFromSysDateTime().Date;
        }
Exemplo n.º 7
0
        /// <summary>
        /// 显示库存药品列表  不显示药库停用的药品 无药房是否停用无关
        /// </summary>
        /// <param name="deptCode">库房编码</param>
        /// <param name="isBatch">是否按批号管理</param>
        public virtual void ShowDeptStorage(string deptCode, bool isBatch)
        {
            Neusoft.NFC.Interface.Classes.Function.ShowWaitForm("正在检索库存药品信息...");
            Application.DoEvents();
            try
            {
                Neusoft.NFC.Management.DataBaseManger databaseManager = new Neusoft.NFC.Management.DataBaseManger();
                DataSet dataSet = new DataSet();
                string  sqlIndex;
                if (isBatch)
                {
                    sqlIndex = "Pharmacy.Item.GetStorageListByBatch";
                }
                else
                {
                    sqlIndex = "Pharmacy.Item.GetStorageListNoBatch";
                }

                databaseManager.ExecQuery(sqlIndex, ref dataSet, deptCode);
                if (dataSet == null)
                {
                    MessageBox.Show("检索列表数据发生错误\n" + databaseManager.Err);
                    return;
                }
                this.filterField = new string[3] {
                    "SPELL_CODE", "WB_CODE", "TRADE_NAME"
                };
                this.DataTable = dataSet.Tables[0];

                //使用控件默认的显示格式
                this.SetFormatForStorage();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                Neusoft.NFC.Interface.Classes.Function.HideWaitForm();
            }
        }