예제 #1
0
        /// <summary>
        /// 设置卡片密码
        /// </summary>
        /// <param name="p_intSector">当参数值为“99”时,设置所有扇区的密码</param>
        /// <param name="p_strPassword">密码</param>
        /// <returns></returns>
        public override bool SetCardPassword(int p_intSector, string p_strPassword)
        {
            bool l_blnReturn = false;

            if (p_intSector == 0)
            {
                l_blnReturn = JocatDevice.SetCardPassword(this.ComPort, p_strPassword);
            }
            else if (p_intSector <= 16)
            {
                l_blnReturn = JocatDevice.SetCardPassword(this.ComPort, p_intSector.ToString(), p_strPassword);
            }
            else
            {
                l_blnReturn = JocatDevice.SetCardAllBlockPassword(this.ComPort, p_strPassword);
            }

            return(l_blnReturn);
        }