Exemplo n.º 1
0
        public bool ChangePassword(string OldPassword, string NewPassword)
        {
            if (_CurrentRole.Length == 0)
            {
                return(false);
            }

            TableDef tdUser = MetaData.GetTableDef(typeof(User));

            return(Dp.ExecuteNonQuery(@"UPDATE _System_User SET 
UserPassword=@0 WHERE UserName=@1 AND UserPassword=@2",
                                      new FieldParam("0", NewPassword),
                                      new FieldParam("1", _CurrentUser),
                                      new FieldParam("2", OldPassword)) > 0);
        }