Esempio n. 1
0
 //其他筛查
 private void btnContinue_Click(object sender, EventArgs e)
 {
     if (_goToForm != null && _questionForm != null)
     {
         //清空排尿异常一二题选择标识
         Properties.Settings.Default.QuesSelFlag = string.Empty;
         //清空问卷记录Id
         Properties.Settings.Default.QuestionnaireRecodId = 0;
         //清空同天内做的同份问卷记录Id
         Properties.Settings.Default.LastTimeQuestionnaireRecodId = 0;
         Properties.Settings.Default.Save();
         //清空答题集合
         LoginInfo.GetInstance().Questionnairs.Clear();
         _goToForm.TopMost = false;
         _goToForm.Show();
         _questionForm.Close();
         Close();
     }
 }
Esempio n. 2
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;
            }
        }
Esempio n. 3
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           = "";
            Public.LoginInfo.GetInstance().PatientAccount = "";
            Public.LoginInfo.GetInstance().FamilyMemberID = 0;
            Public.LoginInfo.GetInstance().Phone          = "";

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

            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;

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

                default:
                    break;
                }
                this.Close();
            }
        }