コード例 #1
0
ファイル: ucEmpower.cs プロジェクト: ewin66/Management-System
 /// <summary>
 /// 授权信息校验
 /// </summary>
 /// <returns></returns>
 private bool Valid()
 {
     if (accountCard == null)
     {
         MessageBox.Show("请输入授权用户的就诊卡号!");
         return(false);
     }
     if (accountCard.Patient == null)
     {
         MessageBox.Show("该卡还没有被发放不能授权,请重新输入授权卡号!");
         return(false);
     }
     account = this.accountManager.GetAccountByMarkNo(accountCard.MarkNO);
     if (account == null)
     {
         MessageBox.Show("该卡不存在帐户不能授权,请重新输入授权卡号!");
         return(false);
     }
     if (account.ValidState == Neusoft.HISFC.Models.Base.EnumValidState.Invalid)
     {
         MessageBox.Show("该卡的帐户已被停用不能授权,请重新输入授权卡号!");
         return(false);
     }
     return(true);
 }
コード例 #2
0
ファイル: ucEmpower.cs プロジェクト: ewin66/Management-System
        /// <summary>
        /// 被授权信息校验
        /// </summary>
        /// <returns></returns>
        private bool EmpowerValid()
        {
            if (empowerAcccountcard == null)
            {
                MessageBox.Show("请输入被授权用户的就诊卡号!");
                return(false);
            }
            if (empowerAcccountcard.Patient == null)
            {
                MessageBox.Show("该卡还没有被发放,不能被授权!");
                return(false);
            }
            HISFC.Models.Account.Account obj = this.accountManager.GetAccountByMarkNo(empowerAcccountcard.MarkNO);
            if (obj != null)
            {
                MessageBox.Show("该卡已存在帐户,不能被授权!");

                return(false);
            }
            AccountEmpower accountEmpwoer = new AccountEmpower();
            int            resultValue    = accountManager.QueryAccountEmpowerByEmpwoerCardNO(empowerAcccountcard.Patient.PID.CardNO, ref accountEmpwoer);

            if (resultValue < 0)
            {
                MessageBox.Show(this.accountManager.Err);
                return(false);
            }
            if (resultValue > 0)
            {
                MessageBox.Show("该帐户已授权不能被再次授权!");
                return(false);
            }
            return(true);
        }
コード例 #3
0
 /// <summary>
 /// 清屏
 /// </summary>
 public void Clear()
 {
     this.ucRegPatientInfo1.Clear();
     if (this.cmbidNOType.Items.Count > 0)
     {
         //01是身份证
         this.cmbidNOType.Tag = "01";
     }
     this.txtidenno.Text   = string.Empty;
     this.txtPassWord.Text = string.Empty;
     account = null;
 }
コード例 #4
0
        /// <summary>
        /// 查找密码
        /// </summary>
        public void QueryAccountPwd()
        {
            string error = string.Empty;

            if (this.cmbidNOType.Tag == null || this.cmbidNOType.Tag.ToString() == string.Empty)
            {
                MessageBox.Show("请输入证件类型!");
                this.cmbidNOType.Focus();
                return;
            }
            //检验身份证号是否正确
            string idennostr  = this.txtidenno.Text.Trim();
            string idennoType = this.cmbidNOType.Tag.ToString();

            if (idennoType == "01")
            {
                int resultValue = Neusoft.FrameWork.WinForms.Classes.Function.CheckIDInfo(idennostr, ref error);
                if (resultValue < 0)
                {
                    MessageBox.Show(error);
                    this.txtidenno.Focus();
                    this.txtidenno.SelectAll();
                    return;
                }
            }
            ArrayList accountList = accountManager.GetAccountByIdNO(this.txtidenno.Text, this.cmbidNOType.Tag.ToString());

            if (accountList == null)
            {
                MessageBox.Show("查找帐户信息失败!" + accountManager.Err);
                return;
            }
            if (accountList.Count > 1)
            {
                MessageBox.Show("该证件号对应的帐户信息不唯一,请与管理员联系!");
                return;
            }
            if (accountList.Count == 0)
            {
                MessageBox.Show("该证件不存在有效的帐户信息,请重新输入!");
                this.txtidenno.SelectAll();
                this.txtidenno.Focus();
                return;
            }

            account = accountList[0] as HISFC.Models.Account.Account;
            this.ucRegPatientInfo1.CardNO = account.CardNO;
            this.txtPassWord.Text         = account.PassWord;
        }
コード例 #5
0
ファイル: ucEmpower.cs プロジェクト: ewin66/Management-System
        /// <summary>
        /// 授权
        /// </summary>
        protected virtual void Empower()
        {
            if (this.spEmpower.Rows.Count == 0)
            {
                return;
            }
            if (this.spEmpower.ActiveRow.Tag == null)
            {
                return;
            }
            int rowIndex = this.spEmpower.ActiveRowIndex;

            if (MessageBox.Show("是否要对该用户进行授权?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
            {
                return;
            }

            //验证授权人帐户密码
            if (!feeIntegrate.CheckAccountPassWord(accountCard.Patient))
            {
                return;
            }


            AccountEmpower accountEmpower = this.spEmpower.ActiveRow.Tag as AccountEmpower;

            //判断被授权用户是否有帐户
            HISFC.Models.Account.Account obj = this.accountManager.GetAccountByMarkNo(accountEmpower.EmpowerCard.MarkNO);
            if (obj != null)
            {
                MessageBox.Show("该用户已存在帐户,不能被授权");
                return;
            }

            if (accountEmpower.ValidState == Neusoft.HISFC.Models.Base.EnumValidState.Valid)
            {
                MessageBox.Show("该用户已授权,不能被再次授权", "提示");
                return;
            }

            if (EmpowerManager(accountEmpower, Neusoft.HISFC.Models.Base.EnumValidState.Valid) == 1)
            {
                MessageBox.Show("授权成功!", "提示");
            }
            this.spEmpower.Cells[rowIndex, 3].Text  = this.GetText(accountEmpower.ValidState);
            this.spEmpower.Rows[rowIndex].Tag       = accountEmpower;
            this.spEmpower.Rows[rowIndex].BackColor = Color.White;
        }