Ejemplo n.º 1
0
        private void btnBefore_Click(object sender, EventArgs e)
        {
            QuestionA1 questionA1 = new QuestionA1();

            questionA1.TopMost = false;
            questionA1.ShowDialog();
            this.Close();
        }
Ejemplo n.º 2
0
        private void btnFeiAi_Click(object sender, EventArgs e)
        {
            Public.LoginInfo loginInfo = Public.LoginInfo.GetInstance();

            //同人同天同问卷做控制
            //if (ClientInfo.AlreadyExistQuestionnaire(QuestionnaireCode.ZaoAiFeiAi, loginInfo.UserId))
            //{
            //    var msgBox = new CustomMessageBox("您今天已做肺癌筛查问卷!");
            //    msgBox.ShowDialog();
            //    return;
            //}

            Zaoai.ScreeningZaoaiSelect screeningZaoaiSelect = new ScreeningZaoaiSelect();

            //this.btnFeiAi.Enabled = false;
            Feiai.QuestionA1 questionA1 = new Feiai.QuestionA1();

            Model.M_QuestionnaireUserDetail questionnaire = new Model.M_QuestionnaireUserDetail();
            questionnaire.QuestionnaireCode   = QuestionnaireCode.ZaoAiFeiAi;
            questionnaire.QuestionnaireName   = QuestionnaireCode.ZaoAiFeiAiName;
            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)
            {
                //如果已经登录,则先判断本次登录是否已经做过此问卷,否则产生用户的回答记录。

                //选择了足踝疾患问卷,则在添加一条问卷记录。


                questionA1.TopMost = false;
                questionA1.ShowDialog();
                this.Close();
            }
            else
            {
                //LoginForm frmLogin = new LoginForm(questionA1);
                //LoginForm frmLogin = new LoginForm(screeningZaoaiSelect);
                //frmLogin.Show();
                //this.Close();

                //新的登录
                LoginFormNew frmLoginFormNew = new LoginFormNew(screeningZaoaiSelect);
                frmLoginFormNew.Show();
                this.Hide();
            }
        }