Ejemplo n.º 1
0
        private void frmVerifyByPwd_Load(object sender, EventArgs e)
        {
            if (DesignMode)
            {
                return;
            }

            clsEmployeeVO[]       data = null;
            clsDigitalSign_domain svc  = new clsDigitalSign_domain();

            svc.m_lngGetDocByDepID(this.EmpId, out data);
            if (data != null && data.Length > 0)
            {
                this.lblName.Text  = data[0].strLastName;
                this.txtEmpNo.Text = data[0].strEmpNO;
                System.Data.DataTable dt = svc.GetEmpInfo(data[0].strEmpNO);
                if (dt != null && dt.Rows.Count > 0)
                {
                    clsSymmetricAlgorithm objAlgorithm = new clsSymmetricAlgorithm();
                    this.Password = objAlgorithm.m_strDecrypt(dt.Rows[0]["psw_chr"].ToString(), clsSymmetricAlgorithm.enmSymmetricAlgorithmType.DES);
                    if (this.Password == null)
                    {
                        this.Password = "";
                    }
                    objAlgorithm = null;
                }
            }
            svc = null;
        }
Ejemplo n.º 2
0
        private void txtEmpNo_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                string empno = this.txtEmpNo.Text.Trim();

                if (empno == "")
                {
                    return;
                }

                DataTable     dt;
                clsDcl_PrePay objPre = new clsDcl_PrePay();
                long          l      = objPre.m_lngGetempinfo(out dt, empno);
                if (l > 0 && dt.Rows.Count == 1)
                {
                    Empid             = dt.Rows[0]["empid_chr"].ToString();
                    Empname           = dt.Rows[0]["lastname_vchr"].ToString();
                    this.lblName.Text = Empname;

                    string userpwd = dt.Rows[0]["psw_chr"].ToString().Trim();
                    clsSymmetricAlgorithm objAlgorithm = new clsSymmetricAlgorithm();
                    this.txtPwd.Tag = objAlgorithm.m_strDecrypt(userpwd, clsSymmetricAlgorithm.enmSymmetricAlgorithmType.DES);
                    objAlgorithm    = null;
                    this.txtPwd.Focus();
                }
                else
                {
                    MessageBox.Show("工号输入错误,请重新输入。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.txtEmpNo.Select();
                }
            }
        }
Ejemplo n.º 3
0
 private void txtID_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (this.txtID.Text.Trim() == "")
         {
             MessageBox.Show("请输入工号");
             this.txtID.Focus();
             return;
         }
         DataTable dt;
         long      ret = m_objManage.m_mthGetEmployeeInfo(this.txtID.Text.Trim(), out dt, "");
         if (ret > 0 && dt.Rows.Count > 0)
         {
             this.txtName.Text = dt.Rows[0]["LASTNAME_VCHR"].ToString().Trim();
             this.txtID.Tag    = dt.Rows[0]["empid_chr"].ToString().Trim();
             //this.txtPS.Tag =dt.Rows[0]["psw_chr"].ToString().Trim();
             clsSymmetricAlgorithm objAlgorithm = new clsSymmetricAlgorithm();
             this.txtPS.Tag = objAlgorithm.m_strDecrypt(dt.Rows[0]["psw_chr"].ToString().Trim(), clsSymmetricAlgorithm.enmSymmetricAlgorithmType.DES);
             this.txtPS.Focus();
         }
         else
         {
             MessageBox.Show("输入的工号不正确");
             this.txtID.Focus();
             return;
         }
     }
 }
Ejemplo n.º 4
0
        private void frmAuditing_Load(object sender, EventArgs e)
        {
            //if (this.intDefault == 2)
            if (this.txtEmpNo.Text.Trim() != "")
            {
                string empno = this.txtEmpNo.Text.Trim();

                if (empno == "")
                {
                    return;
                }

                DataTable     dt;
                clsDcl_PrePay objPre = new clsDcl_PrePay();
                long          l      = objPre.m_lngGetempinfo(out dt, empno);
                if (l > 0 && dt.Rows.Count == 1)
                {
                    Empid             = dt.Rows[0]["empid_chr"].ToString();
                    Empname           = dt.Rows[0]["lastname_vchr"].ToString();
                    this.lblName.Text = Empname;

                    string userpwd = dt.Rows[0]["psw_chr"].ToString().Trim();
                    clsSymmetricAlgorithm objAlgorithm = new clsSymmetricAlgorithm();
                    this.txtPwd.Tag = objAlgorithm.m_strDecrypt(userpwd, clsSymmetricAlgorithm.enmSymmetricAlgorithmType.DES);
                    objAlgorithm    = null;
                    this.txtPwd.Focus();
                }
                else
                {
                    MessageBox.Show("工号输入错误,请重新输入。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.DialogResult = DialogResult.No;
                    this.Close();
                }
                if (this.intDefault == 2)
                {
                    this.txtEmpNo.Enabled = false;
                }
            }
            this.txtPwd.Focus();
            this.txtPwd.Select();
            //this.txtPwd.Focus();
        }
Ejemplo n.º 5
0
        private void frmOPSConfirm_Load(object sender, EventArgs e)
        {
            empid   = this.LoginInfo.m_strEmpID;
            empno   = this.LoginInfo.m_strEmpNo;
            empname = this.LoginInfo.m_strEmpName;

            DataTable dt = new DataTable();
            clsDcl_DoctorWorkstation objSvc = new clsDcl_DoctorWorkstation();
            long ret = objSvc.m_lngGetempinfo(out dt, empno);

            if (dt.Rows.Count == 1)
            {
                //emppwd = dt.Rows[0]["psw_chr"].ToString().Trim();
                clsSymmetricAlgorithm obj = new clsSymmetricAlgorithm();
                this.emppwd = obj.m_strDecrypt(dt.Rows[0]["psw_chr"].ToString().Trim(), clsSymmetricAlgorithm.enmSymmetricAlgorithmType.DES);
                pass        = true;
            }

            this.txtGh.Text   = empno;
            this.lblName.Text = "(姓名: " + empname + ")";
        }
Ejemplo n.º 6
0
        private void txtGh_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                string strempno = this.txtGh.Text.Trim();

                if (strempno == "")
                {
                    return;
                }

                DataTable dt = new DataTable();
                clsDcl_DoctorWorkstation objSvc = new clsDcl_DoctorWorkstation();
                long ret = objSvc.m_lngGetempinfo(out dt, strempno);
                if (dt.Rows.Count == 1)
                {
                    empid   = dt.Rows[0]["empid_chr"].ToString();
                    empname = dt.Rows[0]["lastname_vchr"].ToString();
                    //emppwd = dt.Rows[0]["psw_chr"].ToString().Trim();
                    clsSymmetricAlgorithm obj = new clsSymmetricAlgorithm();
                    this.emppwd = obj.m_strDecrypt(dt.Rows[0]["psw_chr"].ToString().Trim(), clsSymmetricAlgorithm.enmSymmetricAlgorithmType.DES);

                    pass = true;
                    this.lblName.Text = "(姓名: " + empname + ")";
                    this.txtPwd.Focus();
                }
                else
                {
                    pass = false;
                    this.lblName.Text = "";
                    this.txtPwd.Text  = "";
                    MessageBox.Show("工号输入错误,请重新输入。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    this.txtGh.Focus();
                }
            }
        }