コード例 #1
0
        /// <summary>
        /// 部门修改密码
        /// </summary>
        /// <param name="dp_Id">ID</param>
        /// <param name="dp_OldPwd">原密码</param>
        /// <param name="dp_NewPwd">新密码</param>
        /// <param name="dp_ReNewPwd">重复密码</param>
        /// <param name="lblMessage">返回信息</param>
        public void ChangePwd(string dp_Id, string dp_OldPwd, string dp_NewPwd, string dp_ReNewPwd, Label lblMessage)
        {
            int returnMessage = department.ChangePwd(dp_Id, dp_OldPwd, dp_NewPwd, dp_ReNewPwd);

            switch (returnMessage)
            {
            case -1: lblMessage.Text = "两次输入的密码不一致!";
                break;

            case -2: lblMessage.Text = "密码错误!";
                break;

            case 1: lblMessage.Text = "密码修改成功!";
                break;

            case 0: lblMessage.Text = "密码修改失败,请重试!";
                break;
            }
        }