示例#1
0
        public TagControl(string tagname, HospitalTypeEnum hospitalType)
        {
            InitializeComponent();

            toolTip1.ShowAlways = true;
            label1.Visible      = false;
            pictureBox1.Cursor  = Cursors.Hand;
            pictureBox1.Click  += pictureBox1_Click;
            _tagName            = tagname;
            _hospitalType       = hospitalType;

            if (_tagName.Equals(Constant.MYMENU_PATIENT) && File.Exists(PatientImagePath))
            {
                pictureBox1.Image = Image.FromFile(PatientImagePath);
            }
            else if (_tagName.Equals(Constant.MYMENU_APPOINTMENT) && File.Exists(OrderImagePath))
            {
                pictureBox1.Image = Image.FromFile(OrderImagePath);
            }
            else if (_tagName.Equals(Constant.MYMENU_VISIT) && File.Exists(ShareImagePath))
            {
                pictureBox1.Image = Image.FromFile(ShareImagePath);
            }
            else if (_tagName.Equals(Constant.MYMENU_CONSULT) && File.Exists(QAImagePath))
            {
                pictureBox1.Image = Image.FromFile(QAImagePath);
            }

            SetInfo(label1.Text);
        }
示例#2
0
        public TagControl( string tagname , HospitalTypeEnum hospitalType )
        {
            InitializeComponent();

            toolTip1.ShowAlways = true;
            label1.Visible = false;
            pictureBox1.Cursor = Cursors.Hand;
            pictureBox1.Click += pictureBox1_Click;
            _tagName = tagname;
            _hospitalType = hospitalType;

            if (_tagName.Equals( Constant.MYMENU_PATIENT ) && File.Exists( PatientImagePath))
            {
                pictureBox1.Image = Image.FromFile(PatientImagePath);
            }
            else if (_tagName.Equals( Constant.MYMENU_APPOINTMENT ) && File.Exists(OrderImagePath))
            {
                pictureBox1.Image = Image.FromFile(OrderImagePath);
            }
            else if (_tagName.Equals(Constant.MYMENU_VISIT) && File.Exists(ShareImagePath))
            {
                pictureBox1.Image = Image.FromFile(ShareImagePath);
            }
            else if (_tagName.Equals(Constant.MYMENU_CONSULT) && File.Exists(QAImagePath))
            {
                pictureBox1.Image = Image.FromFile(QAImagePath);
            }

            SetInfo(label1.Text);
        }
示例#3
0
        /// <summary>
        /// 判断用户登录的分院是否是诊所
        /// </summary>
        /// <param name="hospitalType"></param>
        /// <returns></returns>
        protected string GetHisUrl(ref HospitalTypeEnum hospitalType)
        {
            hospitalType = HospitalTypeEnum.Hospital;
            string hisUrl = string.Empty;

            if (Variable.User != null && Variable.User.CurrentHospital != null && Variable.User.CurrentHospital.hospitalType == (int)HospitalTypeEnum.Clinic)
            {//判断用户登录的分院是否是诊所
                hisUrl       = Variable.Config.CLINICUrl;
                hospitalType = HospitalTypeEnum.Clinic;
            }
            else
            {
                hisUrl = Variable.Config.HISUrl;
            }
            return(hisUrl);
        }
示例#4
0
        /// <summary>
        /// 加载菜单按钮
        /// </summary>
        protected void LoadMenu()
        {
            try
            {
                HospitalTypeEnum hospitalType = HospitalTypeEnum.Hospital;
                string           hisUrl       = GetHisUrl(ref hospitalType);

                if (hospitalType == HospitalTypeEnum.Clinic)
                {
                    LoadMenu2(hisUrl);
                }
                else
                {
                    LoadMenu1(hisUrl);
                }
            }
            catch (Exception ex)
            {
                LogHelper.WriteException(ex);
            }
        }
示例#5
0
 /// <summary>
 /// 判断用户登录的分院是否是诊所
 /// </summary>
 /// <param name="hospitalType"></param>
 /// <returns></returns>
 protected string GetHisUrl(ref HospitalTypeEnum hospitalType)
 {
     hospitalType = HospitalTypeEnum.Hospital;
     string hisUrl = string.Empty;
     if (Variable.User != null && Variable.User.CurrentHospital != null && Variable.User.CurrentHospital.hospitalType == (int)HospitalTypeEnum.Clinic)
     {//判断用户登录的分院是否是诊所
         hisUrl = Variable.Config.CLINICUrl;
         hospitalType = HospitalTypeEnum.Clinic;
     }
     else
     {
         hisUrl = Variable.Config.HISUrl;
     }
     return hisUrl;
 }