⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ucdictkswh.cs

📁 基于C/S的医疗卫生管理系统
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using Sybase.DataWindow;

using Qeb.Support;
using Qeb.Support.Common;
using Qeb.DBProxy;

namespace Qeb.GY
{
    public partial class UCDictKsWh : Qeb.GY.UCDictBase
    {
        public UCDictKsWh()
        {
            InitializeComponent();
        }

        private void UCDictKsWh_Load(object sender, EventArgs e)
        {
            this.LookUpPromptText = "请输入科室ID或科室名称";

            //初始化数据窗口
            this.dwKsGl.LibraryList = PBL.GyPbl;
            //this.dwKsGl.DataWindowObject = GyDataObjects.D_Gy_KsXxWh;
            this.dwKsGl.DataWindowObject = GyDataObjects.D_Gy_KsXx;
            this.dwKsGl.InitUI();
            //try
            //{
            //    dwKsGl.SetProperty("DataWindow.ReadOnly", "Yes");
            //}
            //catch (Exception ex)
            //{
            //    MessageBox.Show("设置数据窗口只读属性发生异常:" + ex.Message);
            //}
            this.RetrieveData();
        }

        #region 消息处理
        protected override void ProcessUIMessage(string messageId, UIMessageEventArgs e)
        {
            if (messageId == MsgEventDefine.Dict_LookUp)
            {
                this.FindDw(e.Values.ToString());
            }
        }
        #endregion

        #region 根据科室ID、名称查找记录
        private void FindDw(string value)
        {
            if (value == null)
                value = "";

            int findRow = dwKsGl.FindRow("ksid='" + value + "' or ksmc='" + value + "'", 1, dwKsGl.RowCount);
            if (findRow > 0)
            {
                dwKsGl.ScrollToRow(findRow);
                dwKsGl.SetRow(findRow);
            }

        }
        #endregion

        #region 检索数据
        private void RetrieveData()
        {
            try
            {
                DbProxyClient proxy = App.DbProxy;
                proxy.Clear();
                proxy.Retrieve(this.dwKsGl);
            }
            catch (Exception ex)
            {
                MessageBox.Show("检索数据出错:" + ex.Message, MsgTitle.Error);
            }
            finally
            {
                this.m_IsModified = false;
                btnSave.Enabled = false;
            }
            this.dwKsGl.SetSort("ksid");
            this.dwKsGl.Sort();
        }
        #endregion

        private void btnAdd_Click(object sender, EventArgs e)
        {

        }

        private void btnStop_Click(object sender, EventArgs e)
        {

        }

        private void btnModify_Click(object sender, EventArgs e)
        {

        }

        private void btnSave_Click(object sender, EventArgs e)
        {

        }

        private void btnRefresh_Click(object sender, EventArgs e)
        {

        }

        private void btnPrint_Click(object sender, EventArgs e)
        {

        }

        private void btnExport_Click(object sender, EventArgs e)
        {

        }

        private void btnClose_Click(object sender, EventArgs e)
        {

        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -