Exemple #1
0
        /// <summary>
        /// 加载医疗器械类型列表
        /// </summary>
        private void LoadDeviceItems()
        {
            DeviceCacheInstanceManager devicemanager = new DeviceCacheInstanceManager();
            List<KPS.Model.DeviceInfo> listdevicelist = devicemanager.DeviceList;
            CmboxDeviceClass.Items.Clear();
            if (listdevicelist != null && listdevicelist.Count > 0)
            {
                int selectedindex = 0;
                int forindex = 0;
                foreach (KPS.Model.DeviceInfo _device in listdevicelist)
                {
                    if (thisdeviceinfo != null && thisdeviceinfo.DeviceID == _device.DeviceID)
                    {
                        selectedindex = forindex;
                    }
                    CmboxDeviceClass.Items.Add(_device.DeviceType);
                    forindex++;
                }

                CmboxDeviceClass.Tag = listdevicelist;
                CmboxDeviceClass.SelectedIndex = selectedindex;
                thisdeviceinfo = listdevicelist[selectedindex];
            }
        }
        /// <summary>
        /// 加载医疗器械类型列表
        /// </summary>
        private void LoadDeviceItems()
        {
            DeviceCacheInstanceManager devicemanager = new DeviceCacheInstanceManager();
            List<KPS.Model.DeviceInfo> listdevicelist = devicemanager.DeviceList;
            CmboxDeviceClass.Items.Clear();
            if (listdevicelist != null && listdevicelist.Count > 0)
            {
                foreach (KPS.Model.DeviceInfo _device in listdevicelist)
                {
                    CmboxDeviceClass.Items.Add(_device.DeviceType);
                }

                CmboxDeviceClass.Tag = listdevicelist;
                CmboxDeviceClass.SelectedIndex = 0;
                ThisDevice = listdevicelist[0];
            }
        }
Exemple #3
0
        /// <summary>
        /// 主页面加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainFrm_Load(object sender, EventArgs e)
        {
            DeviceCacheInstanceManager devicemanager = new DeviceCacheInstanceManager();
            List<KPS.Model.DeviceInfo> listdevicelist = devicemanager.DeviceList;
            if (listdevicelist != null && listdevicelist.Count > 0)
            {
                SelectedDevice = listdevicelist[0];
            }

            MenuShowByUser();//3.根据用户权限显示禁用相关菜单
        }