Example #1
0
        //会员登录
        private void btnPatientLogin_Click(object sender, EventArgs e)
        {
            if (lvLoginAccount.SelectedIndices != null && lvLoginAccount.SelectedIndices.Count > 0)
            {
                var msgBox = new CustomMessageBox("登录成功");
                msgBox.ShowDialog();
                MainForm.m_isLegalUser = true;
                ListView.SelectedIndexCollection c = lvLoginAccount.SelectedIndices;
                ListViewItem      m_theUserItem    = lvLoginAccount.Items[c[0]];
                string            userName         = m_theUserItem.SubItems[0].Text;
                HeilsCare.Message m_message        = new HeilsCare.Message(MessageType.MSG_LOGIN_SHOW_USER_INFO);
                m_message.AddString(userName);
                HeilsCare.MainForm.m_pMainWnd.m_sharedDataAndMethod.SendMessage(m_message);
                m_message = new HeilsCare.Message(MessageType.MSG_SHOW_HISTROTY_DATA);
                m_message.AddString(userName);
                HeilsCare.MainForm.m_pMainWnd.m_sharedDataAndMethod.SendMessage(m_message);
                if (lvLoginAccount.Items[c[0]].Tag != null)
                {
                    //清空Questionnairs集合
                    Public.LoginInfo.GetInstance().Questionnairs.Clear();

                    if (mRedicectForm != null)
                    {
                        label4.Text = "登录成功!";
                        //mRedicectForm.Show();
                        this.Close();
                    }
                    else
                    {
                        int iWhichQuestion = Properties.Settings.Default.ScreenSet;
                        //LiuPeng
                        iWhichQuestion = -1;
                        //end
                        switch (iWhichQuestion)
                        {
                        case 1:     //老年痴呆筛查
                            AD.FirstFrm frmAdFirst = new AD.FirstFrm();
                            frmAdFirst.TopMost = false;
                            frmAdFirst.Show();
                            break;

                        case 2:     //脑卒中筛查
                            Naocuzhong.FirstFrm naoFirst = new Naocuzhong.FirstFrm();
                            naoFirst.TopMost = false;
                            naoFirst.Show();
                            break;

                        case 3:     //早癌筛查
                            Zaoai.ScreeningZaoaiSelect frmZaoAi = new Zaoai.ScreeningZaoaiSelect();
                            frmZaoAi.TopMost = false;
                            frmZaoAi.Show();
                            break;

                        case 4:     //工伤康复筛查
                            Kangfu.ScreeningSelect frmKangfu = new Kangfu.ScreeningSelect();
                            frmKangfu.TopMost = false;
                            frmKangfu.Show();
                            break;

                        case 5:     //排尿异常
                            Other.ScreenOtherSelect screenOtherSelect = new Other.ScreenOtherSelect();
                            screenOtherSelect.TopMost = false;
                            screenOtherSelect.Show();
                            break;

                        default:
                            break;
                        }
                        this.Close();
                    }
                }
            }
            else
            {
                lblCurMobile.Text = "请先从列表中选中一位会员,再进行登录。";
                return;
            }
        }