コード例 #1
0
ファイル: 密码验证.cs プロジェクト: Wooyme/HIS-1
        private void btnChangePwd_Click(object sender, EventArgs e)
        {
            ReadCard card = new ReadCard(this.Kdjid, _DataBase);//读取当前密码

            if (card.kmm.Trim() != txtOldPassword.Text.Trim())
            {
                MessageBox.Show("原密码不正确!请重新输入", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                txtOldPassword.Focus();
                txtOldPassword.SelectAll();
                return;
            }
            else
            {
                if (txtNewPassword1.Text.Trim() != txtNewPassword2.Text.Trim())
                {
                    MessageBox.Show("新密码与确认新密码不符,请重新输入", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    txtNewPassword1.Text = "";
                    txtNewPassword2.Text = "";
                    txtNewPassword1.Focus();
                    return;
                }
                else
                {
                    string NewPassWord = txtNewPassword1.Text;
                    string ssql        = "update YY_KDJB set kmm='" + NewPassWord + "' where kdjid='" + Kdjid + "'";
                    int    ret         = _DataBase.DoCommand(ssql);
                    if (ret == 0)
                    {
                        MessageBox.Show("修改密码发生错误,没有更新到数据", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    else
                    {
                        //多服务器同步
                        //Guid logId = Guid.Empty;
                        //ts_HospData_Share.ts_update_log ts = new ts_HospData_Share.ts_update_log();
                        //ts.Save_log( ts_HospData_Share.czlx.jc_基础数据单表修改 , "修改卡密码" , "yy_kdjb" , "kdjid" , this.Kdjid.ToString() ,
                        //    TrasenFrame.Forms.FrmMdiMain.Jgbm , -999 , "" , out logId , _DataBase );

                        MessageBox.Show("密码已修改!请牢记和保管好您的密码!", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        gbpSetPassword.Visible = false;
                        gpbConfirm.Visible     = true;
                        txtPassword.Focus();
                    }
                }
            }
        }
コード例 #2
0
ファイル: 密码验证.cs プロジェクト: Wooyme/HIS-1
        private void btnOk_Click(object sender, EventArgs e)
        {
            ReadCard card = new ReadCard(this.Kdjid, _DataBase);

            if (card.kmm.Trim() != txtPassword.Text.Trim())
            {
                MessageBox.Show("密码不正确,请重新输入!", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
                txtPassword.Focus();
                txtPassword.SelectAll();
                return;
            }
            else
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }
コード例 #3
0
ファイル: 收费.cs プロジェクト: Wooyme/HIS-1
        private void butok_Click(object sender, EventArgs e)
        {
            try
            {
                //卡属性
                mz_card card = new mz_card(klx, _DataBase);

                //读取病人卡余额
                ReadCard readcard = new ReadCard(kdjid, _DataBase);

                //校验卡密码
                if (klx != 0 && card.bmm == true && readcard.kye > 0)
                {
                    FrmPassWord fw = new FrmPassWord(_menuTag, "", _mdiParent, _DataBase);
                    fw.Kdjid = kdjid;
                    if (fw.ShowDialog() == DialogResult.Cancel)
                    {
                        return;
                    }

                    //comment by wangzhi 这段不需要,因为密码验证已经在密码窗口验证
                    //if (fw.PassWord.Trim() != Convertor.IsNull(readcard.kmm, ""))
                    //{
                    //    MessageBox.Show("密码验证不正确", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    //    return;
                    //}
                }

                decimal zje  = Convert.ToDecimal(Convertor.IsNull(lblzje.Text, "0"));
                decimal yhje = Convert.ToDecimal(Convertor.IsNull(lblyhje.Text, "0"));
                decimal srje = Convert.ToDecimal(Convertor.IsNull(lblsrje.Text, "0"));

                decimal ybzf = Convert.ToDecimal(Convertor.IsNull(txtybzf.Text, "0"));
                decimal qfgz = Convert.ToDecimal(Convertor.IsNull(txtqfgz.Text, "0"));
                decimal cwjz = Convert.ToDecimal(Convertor.IsNull(txtcwjz.Text, "0"));
                decimal pos  = Convert.ToDecimal(Convertor.IsNull(txtpos.Text, "0"));
                decimal ysxj = Convert.ToDecimal(Convertor.IsNull(lblysxj.Text, "0"));
                decimal ssxj = Convert.ToDecimal(Convertor.IsNull(txtssxj.Text, "0"));

                decimal zpzf = Convert.ToDecimal(Convertor.IsNull(txtzpzf.Text, "0"));

                decimal sumzje = (yhje) + (ybzf) + (qfgz + cwjz + pos) + ysxj + zpzf;

                //////if (Bybsf == true && fpzs > 1)
                //////{
                //////    MessageBox.Show("医保处方收费时,每次只能收取一张发票,如果存在多张发票请分次收取", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                //////    return;
                //////}

                //控制输入实收金额
                SystemCfg cg = new SystemCfg(1032);
                if (cg.Config == "1" && ysxj > 0 && ssxj <= 0)
                {
                    MessageBox.Show("请输入实收现金", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    txtssxj.Focus();
                    return;
                }
                if (cg.Config == null)
                {
                    return;
                }
                if (ssxj < ysxj && ssxj > 0)
                {
                    MessageBox.Show("实收现金不正确,请确认", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    txtssxj.Focus();
                    return;
                }
                if (ysxj == 0 && ssxj > 0)
                {
                    MessageBox.Show("该病人不需要现金支付.", "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    txtssxj.Focus();
                    return;
                }

                //检验公试的平衡性
                if (sumzje != zje)
                {
                    MessageBox.Show("以上支付公式不平衡,请正确输入", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                if (_chineseName == "门诊挂号登记" && zpzf > 0)  //Add By Zj 2012-12-26 因为退签无支票支付,并且实际业务中也没有运用,所以暂时禁止
                {
                    MessageBox.Show("门诊挂号登记不能使用支票支付!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                if (fpzs > 1 && _chineseName != "门诊挂号登记")  //Modify By Zj 2012-12-19 门诊挂号登记 允许多种支付方式 但是 只有挂号费会使用医保支付 其他
                {
                    if ((ysxj > 0 && pos > 0) || (ysxj > 0 && cwjz > 0) || (ysxj > 0 && qfgz > 0) || (ysxj > 0 && zpzf > 0) || (ysxj > 0 && ybzf > 0) || (pos > 0 && cwjz > 0) || (pos > 0 && qfgz > 0) || (pos > 0 && zpzf > 0) || (pos > 0 && ybzf > 0) || (cwjz > 0 && qfgz > 0) || (zpzf > 0 && qfgz > 0) || (cwjz > 0 && ybzf > 0) || (zpzf > 0 && ybzf > 0) || (qfgz > 0 && ybzf > 0))
                    {
                        MessageBox.Show("当有多张发票时,每次只能有一种支付方式。请分票收费", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                }

                if (fpzs > 1 && _chineseName == "门诊挂号登记")  //Modify By Zj 2012-12-26 门诊挂号登记 允许多种支付方式 但是 只支持 现金+医保 或者 POS+医保 或者 财务记账+医保
                {
                    if ((ysxj > 0 && pos > 0) || (ysxj > 0 && cwjz > 0) || (ysxj > 0 && qfgz > 0) || (ysxj > 0 && zpzf > 0) || (pos > 0 && cwjz > 0) || (pos > 0 && qfgz > 0) || (pos > 0 && zpzf > 0) || (cwjz > 0 && qfgz > 0) || (zpzf > 0 && qfgz > 0) || (zpzf > 0 && ybzf > 0))
                    {
                        MessageBox.Show("门诊挂号多张发票支付仅支持 医保支付+(现金,POS,财务记账) 括号中的其中一种.", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }
                }
                if (ysxj < 0 || ybzf < 0 || pos < 0 || qfgz < 0 || cwjz < 0 || zpzf < 0)
                {
                    MessageBox.Show("支付金额中不能有负数 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                if (ybzf < 0 || qfgz < 0 || pos < 0 || cwjz < 0)
                {
                    MessageBox.Show("支付项不能为负数 ", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                Bok = true;
                this.Close();
            }
            catch (System.Exception err)
            {
                MessageBox.Show(err.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
        }