Beispiel #1
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            TopMost = false;
            int iWhichQuestion = Properties.Settings.Default.ScreenSet;

            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;

            default:
                break;
            }
        }
Beispiel #2
0
        //private void AddResult(RadioButton rdA,RadioButton rdB, RadioButton rdC,RadioButton rdD, string questionCode)
        //{
        //    QuestionnaireResultDetail question = new QuestionnaireResultDetail();

        //    if (rdA.Checked) question.QuestionResult = "A,";
        //    if (rdB.Checked) question.QuestionResult = "B,";
        //    if (rdC.Checked) question.QuestionResult = "C,";
        //    if (rdD.Checked) question.QuestionResult = "D,";

        //    question.QuestionCode = questionCode;
        //    question.QuestionType = 1;
        //    question.PQuestionCode = QuestionnaireCode.NaoNianChiDai + ".6";
        //    //打分
        //    //第六题,选择(1)自己可以做,记1分;(2)有些困难,记2分;(3)需要帮助,记3分;(4)根本无法做,记4分,最高40分,权重-0.8
        //    if (!string.IsNullOrEmpty(question.QuestionResult) && question.QuestionResult.Contains("A"))
        //    {
        //        question.QuestionScore = 1;//(decimal)(1*-0.8);
        //        question.PQuestionWeightScore = (decimal)(1 * -0.8);
        //    }
        //    if (!string.IsNullOrEmpty(question.QuestionResult) && question.QuestionResult.Contains("B"))
        //    {
        //        question.QuestionScore = 2;//(decimal)(2 * -0.8);
        //        question.PQuestionWeightScore = (decimal)(2 * -0.8);
        //    }
        //    if (!string.IsNullOrEmpty(question.QuestionResult) && question.QuestionResult.Contains("C"))
        //    {
        //        question.QuestionScore = 3;//(decimal)(3 * -0.8);
        //        question.PQuestionWeightScore = (decimal)(3 * -0.8);
        //    }
        //    if (!string.IsNullOrEmpty(question.QuestionResult) && question.QuestionResult.Contains("D"))
        //    {
        //        question.QuestionScore = 4;//(decimal)(4 * -0.8);
        //        question.PQuestionWeightScore = (decimal)(4 * -0.8);
        //    }

        //    ClientInfo.AddQuestionToQuestionnaire(question, QuestionnaireCode.NaoNianChiDai);

        //}

        private void btnBack_Click(object sender, EventArgs e)
        {
            FirstFrm frmMain = new FirstFrm();

            frmMain.TopMost = false;
            frmMain.Show();
            this.Close();
        }
Beispiel #3
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            //停止播放
            if (wmPlayerForm != null)
            {
                wmPlayerForm.Stop();
            }
            FirstFrm frmMain = new FirstFrm();

            frmMain.TopMost = false;
            frmMain.Show();
            this.Close();
        }
Beispiel #4
0
        //保存问卷设置并跳转页面
        public void SaveSettings()
        {
            //保存医生账号及名称等
            Properties.Settings.Default.DoctorId     = _doctorId;
            Properties.Settings.Default.DoctorName   = _doctorName;
            Properties.Settings.Default.txtDrAccount = _txtDrAccount;
            //Properties.Settings.Default.Save();

            //保存活动Id及名称等
            Properties.Settings.Default.ActivityId     = _activityId;
            Properties.Settings.Default.txtActivName   = _txtActivName;
            Properties.Settings.Default.ActivityName   = _activityName;
            Properties.Settings.Default.ActivityAdress = _activityAdress;

            if (_activityStartDate.HasValue)
            {
                Properties.Settings.Default.ActivityStartDate = Convert.ToDateTime(_activityStartDate);
            }
            if (_activityEndDate.HasValue)
            {
                Properties.Settings.Default.ActivityEndDate = Convert.ToDateTime(_activityEndDate);
            }
            //Properties.Settings.Default.Save();

            //保存小屋Id及名称
            Properties.Settings.Default.CottageOrgId   = _cottageOrgId;
            Properties.Settings.Default.txtCottageName = _txtCottageName;
            Properties.Settings.Default.Save();

            //将所选择活动设为专项活动
            if (Properties.Settings.Default.ActivityId > 0)
            {
                //screeningServiceClient.UpdateCottageActivityTypeTo1(
                //    Properties.Settings.Default.ActivityId,
                //    1,
                //    _doctorId);
                screenWebapiClient.UpdateCottageActivityTypeTo1(
                    Properties.Settings.Default.ActivityId,
                    1,
                    _doctorId);
            }


            //保存问卷设置并跳转页面
            if (rdAD.Checked)
            {
                Properties.Settings.Default.ScreenSet = 1;
            }
            if (rdNaocz.Checked)
            {
                Properties.Settings.Default.ScreenSet = 2;
            }
            if (rdZaoai.Checked)
            {
                Properties.Settings.Default.ScreenSet = 3;
            }
            if (rdKangfu.Checked)
            {
                Properties.Settings.Default.ScreenSet = 4;
            }
            //其他
            if (rdOther.Checked)
            {
                Properties.Settings.Default.ScreenSet = 5;
            }
            Properties.Settings.Default.Save();

            BaseForm selectForm     = null;
            int      iWhichQuestion = Properties.Settings.Default.ScreenSet;

            switch (iWhichQuestion)
            {
            case 1:    //老年痴呆筛查
                selectForm = new AD.FirstFrm();
                break;

            case 2:     //脑卒中筛查
                selectForm = new Naocuzhong.FirstFrm();
                break;

            case 3:    //早癌筛查
                selectForm = new Zaoai.ScreeningZaoaiSelect();
                break;

            case 4:    //工伤康复筛查
                selectForm = new Kangfu.ScreeningSelect();
                break;

            case 5:
                selectForm = new Other.ScreenOtherSelect();
                break;

            default:
                break;
            }

            LoginFormNew loginFormNew = new LoginFormNew(selectForm);

            //LoginForm loginFormNew = new LoginForm(selectForm);
            loginFormNew.Show();
            this.Hide();
        }
Beispiel #5
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            M_QuestionnaireUserDetail result = null;

            if (Properties.Settings.Default.ActivityId > 0)
            {
                //同人同天同问卷做控制
                result = ClientInfo.AlreadyExistQuestionnaire(QuestionnaireCode.NaoNianChiDai, loginInfo.UserId,
                                                              Properties.Settings.Default.ActivityId);
            }
            if (result != null)
            {
                //记录上次问卷Id
                Properties.Settings.Default.LastTimeQuestionnaireRecodId = result.QuestionnaireRecodId;
                Properties.Settings.Default.Save();

                string str = "会员" + LoginInfo.GetInstance().PatientAccount + "于" + result.AnswerTime +
                             "参加本活动,完成了老年痴呆认知筛查。若继续筛查,则上一次筛查数据将被清除。请参考信息登记表,选择";
                QuitComfirmFrm quitComfirmFrm = new QuitComfirmFrm(new FirstFrm(), this, str);
                DialogResult   dr             = quitComfirmFrm.ShowDialog();
                if (dr == DialogResult.Cancel)
                {
                    return;
                }
            }
            else
            {
                //清空上次问卷Id
                Properties.Settings.Default.LastTimeQuestionnaireRecodId = 0;
                Properties.Settings.Default.Save();
            }

            AD.FirstFrm firstFrm = new FirstFrm();

            QuestionOne frmNext = new QuestionOne();

            Model.M_QuestionnaireUserDetail questionnaire = new Model.M_QuestionnaireUserDetail();
            questionnaire.QuestionnaireCode   = QuestionnaireCode.NaoNianChiDai;
            questionnaire.QuestionnaireName   = QuestionnaireCode.NaoNianChiDaiName;
            questionnaire.UserId              = loginInfo.UserId;
            questionnaire.FamilyMemberID      = loginInfo.FamilyMemberID;
            questionnaire.QuestionnaireStatus = 0;
            questionnaire.ActivityId          = Properties.Settings.Default.ActivityId;
            questionnaire.QuestionnaireScore  = 0;
            questionnaire.QuestionnaireType   = 0;
            questionnaire.ActivityName        = Properties.Settings.Default.ActivityName;
            questionnaire.AnswerTime          = DateTime.Now;
            ClientInfo.AddQuestionnaire(questionnaire);
            if (loginInfo.UserId > -2)
            {
                //如果已经登录,则先判断本次登录是否已经做过此问卷,否则产生用户的回答记录。

                //选择了足踝疾患问卷,则在添加一条问卷记录。
                frmNext.TopMost = false;
                frmNext.Show();
                this.Close();
            }
            else
            {
                //LoginForm frmLogin = new LoginForm(frmNext);
                //旧的登录
                //LoginForm frmLogin = new LoginForm(firstFrm);
                //frmLogin.Show();
                //this.Hide();

                //新的登录
                LoginFormNew frmLoginFormNew = new LoginFormNew(firstFrm);
                frmLoginFormNew.Show();
                this.Hide();
            }
        }
Beispiel #6
0
        //结束/下一位
        private void btnQuit_Click(object sender, EventArgs e)
        {
            //
            if (_questionForm != null)
            {
                _questionForm.Close();
            }
            Close();
            return;

            //end


            //清空排尿异常一二题选择标识
            Properties.Settings.Default.QuesSelFlag = string.Empty;
            //清空问卷记录Id
            Properties.Settings.Default.QuestionnaireRecodId = 0;
            //清空同天内做的同份问卷记录Id
            Properties.Settings.Default.LastTimeQuestionnaireRecodId = 0;
            Properties.Settings.Default.Save();

            //清空登录信息
            ClientInfo.Logout();
            //回到登录界面

            BaseForm selectForm     = null;
            int      iWhichQuestion = Properties.Settings.Default.ScreenSet;

            switch (iWhichQuestion)
            {
            case 1:    //老年痴呆筛查
                selectForm = new AD.FirstFrm();
                break;

            case 2:     //脑卒中筛查
                selectForm = new Naocuzhong.FirstFrm();
                break;

            case 3:    //早癌筛查
                selectForm = new Zaoai.ScreeningZaoaiSelect();
                break;

            case 4:    //工伤康复筛查
                selectForm = new Kangfu.ScreeningSelect();
                break;

            case 5:
                selectForm = new Other.ScreenOtherSelect();
                break;

            default:
                break;
            }

            LoginFormNew loginFormNew = new LoginFormNew(selectForm);

            loginFormNew.Show();
            if (_questionForm != null)
            {
                _questionForm.Close();
            }
            Close();
        }
Beispiel #7
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            ScreeningServiceClient client = new ScreeningServiceClient();

            string strUserName = txtUserName.Text.Trim();
            string strPassword = txtPassword.Text.Trim();

            if (string.IsNullOrEmpty(strUserName))
            {
                //MessageBox.Show("请输入用户名");
                label4.Text = "请输入用户名!";
                return;
            }

            if (string.IsNullOrEmpty(strPassword))
            {
                //MessageBox.Show("请输入密码");
                label4.Text = "请输入密码!";
                return;
            }

            Services.M_User userInfo = client.Login(strUserName, strPassword);

            if (userInfo != null)
            {
                Public.LoginInfo.GetInstance().UserId = userInfo.UserId;
                Public.LoginInfo.GetInstance().Name   = userInfo.UserName;

                //把登录的人作为活动参与人员建立与活动的关联关系。
                //M_CottageActivityRecord entity = new M_CottageActivityRecord();
                //entity.CActivityID = Properties.Settings.Default.ActivityId;
                //entity.PatientAccount = strUserName;
                //entity.PatientID = userInfo.UserId;
                //entity.PatientName = userInfo.UserName;
                //entity.Phone = userInfo.Mobie;
                //entity.DoctorID = Properties.Settings.Default.DoctorId;
                //entity.DoctorName = Properties.Settings.Default.DoctorName;
                //entity.DrID = Properties.Settings.Default.DoctorId;
                //entity.DrName = Properties.Settings.Default.DoctorName;
                //entity.UpdateDrID = Properties.Settings.Default.DoctorId;

                ////新增
                //entity.CreateDrID = Properties.Settings.Default.DoctorId;
                //entity.CreateDrName = Properties.Settings.Default.DoctorName;
                //entity.UpdateDrName = Properties.Settings.Default.DoctorName;
                ////报名来源,默认0,1-WEB医生端,2-网络医院APP,3-推广大使APP,4-健康管理师APP,5-筛查机
                //entity.RegSource = 5;
                ////签到来源,默认0,1-WEB医生端,2-网络医院APP,3-推广大使APP,4-健康管理师APP,5-筛查机
                //entity.SignSource = 5;

                //var result= client.AddPatientToCottageActivity(entity);

                //if (result!=null)
                //{
                //    Properties.Settings.Default.CARecordID = result.CARecordID;
                //    Properties.Settings.Default.Save();

                //    //MessageBox.Show(Properties.Settings.Default.CARecordID.ToString());
                //}

                //清空Questionnairs集合
                Public.LoginInfo.GetInstance().Questionnairs.Clear();

                if (mRedicectForm != null)
                {
                    //MessageBox.Show("登录成功");
                    label4.Text = "登录成功!";
                    //mRedicectForm.TopMost = false;
                    mRedicectForm.Show();
                    this.Close();
                }
                else
                {
                    int iWhichQuestion = Properties.Settings.Default.ScreenSet;
                    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;

                    default:
                        break;
                    }
                    this.Close();
                }
            }
            else
            {
                //MessageBox.Show("用户名或密码不对,请重新输入");
                label4.Text = "用户名或密码不对,请重新输入!";
                return;
            }
        }
Beispiel #8
0
        private void btnGuest_Click(object sender, EventArgs e)
        {
            //修改游客序号配置
            if (!Properties.Settings.Default.ScreenDate.ToShortDateString().Equals(DateTime.Now.ToShortDateString()))
            {
                Properties.Settings.Default.ScreenDate   = DateTime.Now.Date;
                Properties.Settings.Default.ScreenNumber = 1;
            }
            else
            {
                if (Properties.Settings.Default.ScreenNumber <= 9999)
                {
                    Properties.Settings.Default.ScreenNumber += 1;
                }
                else
                {
                    label4.Text = "人数已达到上限";
                    return;
                }
            }
            Properties.Settings.Default.Save();

            btnGuest.Enabled = true;
            Public.LoginInfo.GetInstance().UserId = -1; //游客模式,UserID定为-1
            Public.LoginInfo.GetInstance().Name   = "";
            if (mRedicectForm != null)
            {
                mRedicectForm.TopMost = false;
                mRedicectForm.Show();
                this.Close();
            }
            else
            {
                int iWhichQuestion = Properties.Settings.Default.ScreenSet;
                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;

                default:
                    break;
                }
                this.Close();
            }
        }
Beispiel #9
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;
            }
        }