示例#1
0
        public void MVChangePassWordServ(
            [ONInboundArgument("", "oldpassword", "password", "", "MVChangePassWord", "Clas_1348605050880238_Alias", "Administrador", AllowsNull = false)] ONString oldpasswordArg,
            [ONInboundArgument("", "newpassword", "password", "", "MVChangePassWord", "Clas_1348605050880238_Alias", "Administrador", AllowsNull = false)] ONString newpasswordArg)
        {
            ONString lPassword = new ONString(Instance.PassWordAttr);
            //Cipher password argument
            ONString lOldPassword = new ONString(ONSecureControl.CipherPassword(oldpasswordArg.TypedValue));

            if (lPassword.TypedValue == lOldPassword.TypedValue)
            {
                //Cipher password argument
                lPassword = new ONString(ONSecureControl.CipherPassword(newpasswordArg.TypedValue));
                //Update Attribute
                Instance.PassWordAttr = lPassword;
            }
            else
            {
                throw new ONAgentValidationException(null);
            }
        }