示例#1
0
        private void loadRecord()
        {
            if (null == tblOpRecord)
            {
                this.tblOpRecord = new DataTable();
                this.tblOpRecord.Columns.Add("TypeCode", typeof(string));
                this.tblOpRecord.Columns.Add("ID", typeof(int));
                this.tblOpRecord.Columns.Add("DeptName", typeof(string));
                this.tblOpRecord.Columns.Add("BedNo", typeof(string));
                this.tblOpRecord.Columns.Add("PatientName", typeof(string));
                this.tblOpRecord.Columns.Add("OpTime", typeof(DateTime));
                this.tblOpRecord.Columns.Add("Content", typeof(string));
                this.tblOpRecord.Columns.Add("Operater", typeof(string));
                this.tblOpRecord.PrimaryKey = new DataColumn[] { this.tblOpRecord.Columns["TypeCode"],
                                                                 this.tblOpRecord.Columns["ID"] };
            }
            else
            {
                this.tblOpRecord.Clear();
                lvRecord.Items.Refresh();
            }

            ComClass.getAcountNameList(AppConst.db, ComClass.Acounts);

            loadCustody();
            loadIntervene();
            loadPMNote();

            this.tblOpRecord.DefaultView.Sort = "OpTime";
            lvRecord.ItemsSource = this.tblOpRecord.DefaultView;
        }
示例#2
0
        void IMenuManager.menuBeforeSelect()
        {
            try
            {
                this.db = new BLPublic.DBOperate(AppDomain.CurrentDomain.BaseDirectory + "bl_server.lcf",
                                                 AppConst.SYSTEM_ID);

                if (!this.db.IsConnected)
                {
                    BLPublic.Dialogs.Error("连接服务器失败:" + this.db.Error);
                    return;
                }
                AppConst.db = this.db;
                ComClass.getAcountNameList(AppConst.db, ComClass.Acounts);

                listWard();//初始化患者查询页面中有个病区的下拉列表,耗时80毫秒
                loadPatient(false);
                Page_Click(btnTPNOrders, null);
            }
            catch (Exception ex)
            {
                ShowMsgHelper.ShowError("TPN画面加载时出错:" + ex.Message);
            }
        }